I’m writing an application that plots about 750,000 points. It usually takes about 200-230 milliseconds to do a redraw. I’m fairly new to open gl programming and feel like this may be a little slow and that in some way I am not taking avantage of the hardware acceleration the way I should, despite modeling my opengl setup after demo programs from NeHe’s website. Does anyone know if this is the speed for which i can expect opengl to render or am I doing something wrong.
No, there is no predefined performance requirements set by GL. That means if it takes 500 days to render 1 triangle, then that is OK.
One of the fastest way to render is to use VBO and specify you buffers as beeing STATIC, which means everything will be placed in VRAM (most likely), and use glDrawRangeElements or glDrawArray. On some drivers, it turns out display lists are faster.
Of course, other GL states effect the performance you get. Blending? alpha test? Do you render front to back? Are all points in viewport? Are you using shaders? …
That quite a large number of points. try to put them in a display list (as said V-man) if it not already the case, and see if it improves. What is your system ? video card ?
If you have a doubt about hardware acceleration, use glGetString(glgetstring) in the middle of your rendering to see if it is Microsoft (software case).
I put the glGetString() in the middle of my code like you suggested and for vendor it returned “Microsoft Corporation” and for renderer it returned “GDI Generic”. I am assuming that based on this I am not getting any hardware acceleration.
The system I’m using is a dell precision 340 1.8 ghz, with a ATI Radeon 7000 video card.
How do I go about getting hardware acceleration.
Anytime you see “Microsoft GDI renderer” means you are using the OpenGL functions in the default software-only OpenGL32.DLL directly, not the functions from any available OEM accelerator driver.
Enabling OpenGL acceleration is usually done automatically when you install or update an OEM’s display drivers. You can check the registry key for the currently installed OpenGL driver under HKLM > Software > Microsoft > Windows. For an ATI card, the OpenGL driver should read something like “ati***gl***.dll”
If there is no such entry, try re-installing the ATI drivers. You might also try editing the registry key manually, but you will need to know the exact name of the driver DLL looking at the temp install directory or INF file.
One last note is that I’ve seen it possible to get this driver string message even when the accelerated driver is properly setup if you requested a pixel format with GDI flag added to OPENGL flag.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.