Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - tntexplosivesltd

Pages: [1] 2
1
Window / Set a window's Class under linux
« on: September 09, 2012, 06:38:56 am »
Hi

I need to set my game's WM_CLASS under linux in order for my window manager to draw the window correctly. Is there a way to do this with SFML?

2
Window / SFML 2 Screenshot
« on: June 08, 2011, 07:03:24 am »
Hi there
How do I take a screenshot with SFML 2? I was using 1.6 until an update was forced upon me (thanks, btw). I have to change my code to use SFML 2, but can find nothing about taking a screenshot. Grr. Capture() doesn't exist any more =(

3
Window / sf::Event return key pressed
« on: May 27, 2011, 05:17:44 pm »
Hi there
Is there any way to get sf::Event to return the scancode of the key that was pressed?
Thanks

4
Graphics / SFML screenshot quality
« on: May 09, 2011, 02:41:54 pm »
Hi there!
Is there any way to specify the quality of a .jpg screenshot when you save it using SFML? I want high-quality screenshots, but I don't want huge bitmap files being created.
Thanks in advance!

5
Window / X error on program exit
« on: May 09, 2011, 02:39:21 am »
Hmm. I'm using Arch on a netbook (the Acer Aspire One D255), and when I close my program I get the following error:
Code: [Select]

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  137 (DRI2)
  Minor opcode of failed request:  7 (DRI2GetBuffersWithFormat )
  Resource id in failed request:  0x2200006
  Serial number of failed request:  187
  Current serial number in output stream:  187

Is this the code's fault, or is it xf86-video-intel's fault?
Thanks

6
General / Intercept SFML errors
« on: May 08, 2011, 03:52:00 pm »
Hi there
Just wondering if there is a way of intercepting SFML error messages (I assume they are bound for stderr or sdtout).
I want to be able to display errors on the screen, rather than have them go to the console.
Thanks in advance.

7
Window / OpenGL Vertex Buffer Objects in SFML
« on: February 20, 2011, 10:08:19 am »
Hi,
How can I use VBOs in SFML? What extra stuff do I need to include (if anything).

8
Graphics / Smaller images from a larger image
« on: February 13, 2011, 09:40:10 am »
Hi.
I am wondering how to load an image of ASCII characters and create many smaller images (one for each letter) from that large image.
Thank you in advance,
tntexplosivesltd.

9
Window / OpenGL Initialisation in Constructor
« on: February 04, 2011, 08:33:19 am »
At the moment I have a rendering class with a constructor, and a draw() method. The OpenGL initialisation is in the constructor, and the draw() method draws a cube. My main game loop creates a rendering constructor outside the loop, then inside the loop it calls draw() each frame. the problem is that all OpenGL initialisation is forgotten about when the game loop calls the draw() method. Using PreserveOpenGLStates doesn't work.

By the way, I am using SFML 1.6 :wink:

10
General discussions / C++ scripting in SFML games
« on: February 02, 2011, 09:37:56 am »
Hi there. Is there any easy way to have C++ scripting in C++ SFML games? What is the easiest way to open up the SFML game to users to be able to write C++ plugins?

11
Window / OpenGL cubes some faces see-through?
« on: January 29, 2011, 01:54:52 am »
This might not be the right place to ask this, but I am really frustrated at the moment.
I have some OpenGL code that draws a cube. The problem is that some of the faces end up being partially see-through, or not visible at all from the outside. When I move inside the cube, all faces can be seen, but a second cube I placed can be seen through them.
I tried making the faces drawn anticlockwise, clockwise, I tried setting glFrontFace() to GL_CW and GL_CCW, and it changes absolutely nothing.

This exact code is also used in another of my projects and it displays fine!
What's going on?
Here is the code:
Code: [Select]

const float HALFSIZE = 8.f;
glBegin(GL_QUADS);
  glTexCoord2f(0.f, 0.f); glVertex3f(-HALFSIZE, -HALFSIZE, -HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(-HALFSIZE,  HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f( HALFSIZE,  HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f( HALFSIZE, -HALFSIZE, -HALFSIZE);

  glTexCoord2f(0.f, 0.f); glVertex3f(-HALFSIZE, -HALFSIZE, HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(-HALFSIZE,  HALFSIZE, HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f( HALFSIZE,  HALFSIZE, HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f( HALFSIZE, -HALFSIZE, HALFSIZE);

  glTexCoord2f(0.f, 0.f); glVertex3f(-HALFSIZE, -HALFSIZE, -HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(-HALFSIZE,  HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f(-HALFSIZE,  HALFSIZE,  HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f(-HALFSIZE, -HALFSIZE,  HALFSIZE);

  glTexCoord2f(0.f, 0.f); glVertex3f(HALFSIZE, -HALFSIZE, -HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(HALFSIZE,  HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f(HALFSIZE,  HALFSIZE,  HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f(HALFSIZE, -HALFSIZE,  HALFSIZE);

  //this is the magenta face
  glTexCoord2f(0.f, 0.f); glVertex3f(-HALFSIZE, -HALFSIZE,  HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(-HALFSIZE, -HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f( HALFSIZE, -HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f( HALFSIZE, -HALFSIZE,  HALFSIZE);

  //This is the cyan face
  glTexCoord2f(0.f, 0.f); glVertex3f(-HALFSIZE, HALFSIZE,  HALFSIZE);
  glTexCoord2f(0.f, 1.f); glVertex3f(-HALFSIZE, HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 1.f); glVertex3f( HALFSIZE, HALFSIZE, -HALFSIZE);
  glTexCoord2f(1.f, 0.f); glVertex3f( HALFSIZE, HALFSIZE,  HALFSIZE);
glEnd();

And some screenshots of the problem (the faces have been coloured for your convenience - magenta is the front of the cube, cyan is the back):
http://oi56.tinypic.com/2sb6102.jpg (magenta should be in front, it's not)
http://oi55.tinypic.com/11tyfb8.jpg
http://oi56.tinypic.com/21jajp4.jpg
http://oi52.tinypic.com/5x4k0i.jpg (cyan is always in front. This is looking at the back - it looks as it should)
Note that the only face displaying correctly is the cyan one. What's different about it?
Thanks for any help, I'm really stumped by this.

12
SFML projects / Having dll files available for download
« on: January 28, 2011, 09:41:31 am »
If we want to distribute an SFML game, and want to give people the option of downloading the dll files seperately, are we able to host those on out servers? What are the general rules around distributing them ourselves?

13
Window / sv::VideoMode memory leak
« on: January 28, 2011, 05:12:22 am »
I am using SFML 1.6 under Arch Linux, and I came across a small problem. When running my code through Valgrind, it says:
"28 bytes in block 1 definitely lost"
or something like that. Here is the offending line:
Code: [Select]

sf::VideoMode best_mode = sf::VideoMode::GetMode(0);

It has the same leak if I use a constructor list:
Code: [Select]

sf::VideoMode best_mode;
void Initialise() : best_mode(sf::VideoMode::GetMode(0))
{
  ...
}

Is this an error in SFML, or am I doing something wrong?

14
Window / OpenGL calls in a different thread
« on: January 17, 2011, 09:40:37 am »
Hi.
I was planning a game loop and decided to have an SFML windowing/input loop in one thread, and an OpenGL 3D rendering loop in another.
Since then, I have come across some potential flaws in my idea:

• If I use SetActive() in one thread, and have the OpenGL calls in another, will it apply the OpenGL stuff to the "active" window.
• Which loop/thread do I have to use the Display() method in? What if the Display() method is called halfway through the OpenGL loop doing it's thing?

Would appreciate any comments/suggestions on seperating rendering and input in seperate threads(is it a good idea?)

Thanks in advance
tntexplosivesltd

15
Graphics / SFML 1.6 Screen Capture takes a while
« on: December 30, 2010, 09:34:18 am »
Hi
Is there a way to speed up a screen capture in SFML 1.6? At the moment, there is a reasonably long pause (~1-2 seconds) when you tell it to do a screenshot.
Thanks!

Pages: [1] 2
anything