Thanks for the answers. So, I am assured that the whole loop will just be called at most 60 times per second because of the Sleep in the window.Display().
Now, I explored my code and noticed that a single draw method was enough to boost my cpu usage to about 20 - 30. In my loop, I just did this:
Shape blocksPanel = Shape::Rectangle(
(GRID_WIDTH + 2) * BLOCK_SIZE,
BLOCK_SIZE * 8,
(GRID_WIDTH + 7) * BLOCK_SIZE,
(GRID_HEIGHT_LIMIT + 1) * BLOCK_SIZE,
BG_COLOR,
OUTLINE,
OUTLINE_COLOR);
window->Draw(blocksPanel);
Is this acceptable? Is the CPU usage of 50 acceptable when running a simple application? By the way, I used a pointer for the RenderWindow
RenderWindow *window;
VideoMode mode(GUI_WIDTH, GUI_HEIGHT, 32);
window = new RenderWindow(mode, "Falling Blocks", Style::Close);
Does that affect the performance of the application?
[edit] Hmmm. I think that my PC is responsible for the slow display. I tried my program in a different computer and it runs smoothly.
Thanks anyways...