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 - tester

Pages: [1]
I looked into the source code to check how the framerate limit works. And I saw that if a framerate is set, the Display function simply calls the Sleep function. And the Sleep function, in Windows, is a wrapper to the WinAPI Sleep function.
Now my question: Isn't that some kind of a hack? I mean, Sleep doesn't just suspend the graphic output inside the window, it suspends the whole application. So, let's say, to demonstrate the case, I program a game with one frame per second: I would expect the gaming screen to update once per second. But I would expect the window itself (resizing, moving, minimizing, closing etc.) to work as usual. But instead, of course, it only works once per second.

General / Compiling SFML
« on: April 28, 2010, 11:58:24 am »
What do I have to do to compile SFML from source? There is no configure file for GCC. Does that mean I have to include all source files manually to the project?

Window / Menus and dialog boxes
« on: April 28, 2010, 09:57:07 am »
Is there any way to add a menu to an SFML window? And is it possible to show dialog boxes with control elements on them? If no, is it possible to get the platform dependent data for the window (in Windows: HWND)?

Graphics / Sprite is blurry
« on: April 15, 2010, 11:32:01 pm »
I'm experimenting with the SFML and wrote a sample program to display a sprite.

This is the sprite (as a BMP, but PNG produces the same problem):

And this is the output:

But of course, I would expect this:

So, why is it displayed so blurry?

This is my code:
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
sf::RenderWindow screen(sf::VideoMode(100, 50, 32), "Test");

sf::Image image;

sf::Sprite sprite;

while (screen.IsOpened())
sf::Event event;

while (screen.GetEvent(event))
if (event.Type == sf::Event::Closed)

screen.Clear(sf::Color(0, 127, 127));


Pages: [1]