PDA

View Full Version : OpenGL Running at lightspeed - why ??



kudu
January 5th, 2006, 08:16 AM
I'm having trouble with OpenGL example programs running at lightspeed. My triangles are whizzing around at warp factor 8, should be sedately rotating at a nice leisurely pace showing off in all their glory.

I'd like to know why it's so damn fast and how I can fix it ? My card seems to be working correctly, games run fine etc.

Thanks!

Lord Illidan
January 5th, 2006, 08:27 AM
You should be pleased that they run so fast... hehe
You are using glxgears, I presume.

Run it like this :

glxgears -printfps

kudu
January 5th, 2006, 11:02 AM
I'm not referring to glxgears. Gears are running slowly at a cool 12225 fps!

I'm talking about compiling and running OpenGL apps, like the classic "Triangle" spinning sample app. The triangle should spin slowly around its axis, but it's not. It's zipping around in a blur about a million miles an hour.

I want to know if it's my hardware or software causing this anomoly ? How do you control spin rate ?

Never had it spinning so damn fast before. :)

kudu...out

Retrix
January 5th, 2006, 01:17 PM
You can either sleep for a small period of time after drawing a frame, or decrease the delta - the amount you rotate the scene by.

Lord Illidan
January 5th, 2006, 01:25 PM
If you have made the programs yourself, than it could be that you need to implement a wait function.

Interesting, that your glxgears is so high, though. What are your system specs?

fct
January 5th, 2006, 08:08 PM
It's normal that programs using basic functions run that fast. That's why most game programmers put an FPS limit in their code so when played years later in much faster hardware it won't be unplayable.

Old games didn't do that and the result is that you had to use speed limitters in your 486 when playing games developed for 8086 processors.

kudu
January 5th, 2006, 08:29 PM
If you have made the programs yourself, than it could be that you need to implement a wait function.

Interesting, that your glxgears is so high, though. What are your system specs?

2.26 GHz CPU, 512MB RAM, GeForce 6800 GT video card. Nothing cutting edge.

When I run the same example code on the same machine in Windows it runs correctly.

Very interesting!

Lagiv
January 5th, 2006, 08:47 PM
When I run the same example code on the same machine in Windows it runs correctly.
Maybe you have Vsync activated in Windows, so it's synced to your monitor refresh rate.

fct
January 7th, 2006, 12:15 AM
If that's the case, install nvidia-settings, run it, and check "Sync to VBlank" on the OpenGL Settings option.

kudu
January 7th, 2006, 08:02 AM
If that's the case, install nvidia-settings, run it, and check "Sync to VBlank" on the OpenGL Settings option.


That did it, thanks very much to both you vsync fellows. Cool!