Same speed on every PC?

my first question here…

Why rotates a simple triangle on every PC with the same speed, when DrawScene() is built in a simple while(!done) construct without any FPS-delay thing (like necessary in SDL (

You see, I am very new to OpenGL. :smiley:

Edit: My source code is the one of Lesson 5

No.They are rotated with different frame rates in different systems – If i understand your question.
Read these discussions:;f=2;t=018648


Now I use GetTickCount(); for checking time at the beginning of the while(!done) loop and the following for updating my scene:

time_elapsed = time_now - time_prev;
rtri1 += 0.2f * (GLfloat) time_elapsed;

Before I used this method for updating my scene it
worked nicely, but now it runs slowly. can simply use from a greater value than 0.2. As an example you can use from the following code:
m_timeNow = GetTickCount(); // Hi-resolution clock
m_elapsedTime = m_timeNow - m_previousTime;
m_previousTime = m_timeNow;
angle += 2 * m_elapsedTime;//Greater value
if( angle >= 360.0f ) angle -= 360.0f;
glRotatef(angle, …);


GetTickCount() returns the elapsed system time in milliseconds, not seconds, so you need to scale accordingly.

Thanks, but I dont mean that kind of slow. ^^

I know, that I need to increase the value of rtri, but I mean it has a low FPS, it somehow stucks when I push a button (ie for rotating the triangle).

Maybe it is necessary to use hardware acceleration, but I dont know how I can do this.

Thanks for your patience.

Which graphics card are you using?

I use a GeForce 2 MX.

The NVIDIA GeForce2 MX provides optimized support for DirectX and OpenGL 1.2 applications under Microsoft® Windows® 98, Microsoft Windows NT® 4.0, Microsoft Windows 2000, and Microsoft Windows XP.
So it may doesn’t support the new features of the current version of OpenGL.But i believe that you don’t need to change it.