Does Windows allow hardware acceleration for OpenGL? Book says otherwise...

Started by
10 comments, last by _the_phantom_ 17 years, 10 months ago
I bought the OpenGL SuperBible, and I had the impression that OpenGL is hardware-based on Windows XP and Vista (if the video card supports Vista's requirements). The book says otherwise, like the entire MS implementation is software-based. The book reads...
Quote: OpenGL is intended for use with computer hardware that is designed and optimized for the display and manipulation of 3D graphics. Software-only, "generic" implementations of OpenGL are also possible, and the Microsoft implementations fall into this category. With a software-only implementation, rendering may not be performed as quickly, and some advanced special effects may not be available. However, using a software implementation means that your program can potentially run on a wider variety of computer systems that may not have a 3D graphics card installed.
I'm assuming the author got this wrong?
Advertisement
It's a little trickier than you would think from that paragraph. MICROSOFT'S implementation of OpenGL is software-based (and never made it past 1.0, I think), but most games will use the OpenGL driver that the video card manufacturer provides, which requires using the extension interface to access.

Does that make things any clearer?
I think so. I guess I'm using the software interface until I read about extensions? Are they fairly easy to use in your opinion?
The opengl32 library automatically defers function calls to the video card manufacturer's implementation (e.g. nvoglnt.dll for nVidia), so you will get hardware accelleration automatically.

However, opengl32.lib only knows about OpenGL functions up to version 1.1. To use 1.2+ functions, you have to use extensions. They are easy to use and there are helper libraries available for free that hide the extension details and let you pretend you aren't using extensions. GLee is one example.

Quote:Original post by phil05
I guess I'm using the software interface until I read about extensions?

Not necessarily. What video hardware is your computer equipped with? Have you installed the video manufacturer's drivers? It's difficult to find hardware that doesn't support at least basic OpenGL in hardware anymore.

Quote:Original post by phil05
Are they fairly easy to use in your opinion?

Yes. If you don't want to deal with the tedium an old OpenGL interface (such as the one Microsoft provides) presents you with using new features through extensions, there are a number of mostly automated libraries available such as GLEW.
I have an outdated video card (ATI Radeon 9250), but I used glGetString() finding it supports up to version 1.3.1072. Thanks for the input today. With dlls being in the video card these days, I guess there's less worry about how MS tries to degrade it.
If you download the microsoft opengl implementation (could be already on the pc, I don't know) and put that dll in your app folder, it will use this instead than the HW version. That is what happened to me when I first started with OGL (a 2000 polys model at 10 fps on a geForce6600, I was sure that something was wrong :-(
Heh, yeah that could cause some frustration.

I noticed my Windows\System32\ folder contains opengl32.dll. Is this the one I should be removing? Just out of experimenting, I removed it, and my application still ran without a problem. I just need to make sure what dlls I should be looking out for. Thanks again.

PS. I noticed when I execute my OpenGL program, it automatically throws opengl32.dll BACK INTO Windows\System32\. *scratches head*
no no no no no!
never EVER remove system files!
Its bad mojo and it is infact REQUIRED to use OpenGL as you link to a lib which loads the opengl32.dll, if you somehow manage to remove it then your program wont work.

Just make sure you have the most recent drivers for your graphics card installed and you won't have any problems.
Alright. I guess what I'm wondering is how can I tell during runtime?

This topic is closed to new replies.

Advertisement