# Same speed on every PC?

Hiho,
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 (http://www.libsdl.org/))?

You see, I am very new to OpenGL.

Edit: My source code is the one of nehe.gamedev.net Lesson 5

No.They are rotated with different frame rates in different systems – If i understand your question.
Read these discussions:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=018648
-Ehsan-

Thanks.

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

glRotatef(rtri1,0.0f,1.5f,0.0f);
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.

Awww.you 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, …);

-Ehsan-

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.
-Ehsan-