OpenGL is too slow ...

Started by
15 comments, last by FlyingSolo 14 years, 5 months ago
I'm puzzled. Very puzzled in fact. I'm a newcomer to OpenGL (good, isn't it!) and have been using various online references and tutorials including videotutorialsrock.com and our own beloved NeHe. Many of the example programs that accompany these tutorials don't do a great deal, but are not timer driven - they are running flat out. What gives? An OpenGL program rotating a small quad or triangle surely should be a blur if in a loop with nothing else going on ? My own code, basic though it is so far, certainly isn't showing any lightning qualities despite doing very very little. How are people writing hugely complex apps like flight/racing simulators which have extremely rapid full-screen graphics movement? I'm Puzzled. Would love to hear comments from the more experienced out there.
Advertisement
My guess is that vsync is limiting your framerate. Vsync is an option available on most video hardware that limits the framerate to the monitor's refresh rate. This prevents wasted frames being generated that would never be displayed by the monitor and it also prevents "tearing" that occurs when a frame changes in the middle of a refresh.
-~-The Cow of Darkness-~-
Are you sure the limiting factor really is the drawing, and not, say, the vertical sync limiting the frame rate?
What OS/compiler/language etc. are you using?
Start by updating to the latest drivers from the homepage of your graphics card manufacturer.
Download NVIDIA Drivers.
ATI.
Just to add specifics to what others said...

If your FPS is stuck at 60 or 80 fps, that means vsync is limiting your FPS to prevent tearing (:

If that's the case, ignore it or figure out how to turn off vsync on your computer (you can do it in code, and sometimes you can do it via driver settings) if you want to see the true fps.

If that isn't the case, how much FPS are you getting?
If it's time based movement (which I think most of nehe's stuff is) it'll rotate at the same speed no matter what the framerate is

-me
Sorry chaps: Windows XP(Pro), loadsa RAM, nVidia 9600GT (512MB)
Compiler: MS Visual C (Express). Latest nVidia Drivers.
I know my system is happy since I'm getting very good frame rates from X-Plane, my favourite OpenGL app.

Frame rates for NeHe's 'example04' are about 20-30 with Vsync enabled, and very f.quick if it isn't. Surely vsync shouldn't make _that_ much of an impact?

Is it normal for a graphic intensive (ie: game/simulation) OpenGl prog to force the Vsync to off?

the only alternative would be to use larger steps in the animation - icky icky.
Quote:Original post by Palidine
If it's time based movement (which I think most of nehe's stuff is) it'll rotate at the same speed no matter what the framerate is


Check out Example 4 - not a timer to be seen.

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=04
Quote:Original post by FlyingSolo
Quote:Original post by Palidine
If it's time based movement (which I think most of nehe's stuff is) it'll rotate at the same speed no matter what the framerate is


Check out Example 4 - not a timer to be seen.

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=04


Yep. But it's definitely not disabling vsync so there's your reason.

[EDIT: and before you ask this is why vsync is default to on: http://en.wikipedia.org/wiki/Page_tearing]

-me
Paladine, he said hes getting 20-30 fps. If it is vsync he should be getting 60 (or 80 or whatever his montior refreshes at).

20-30 seems to indicate he should update his video drivers dont you think?

This topic is closed to new replies.

Advertisement