Simple question about OpenGL

This is probably an obvious question, but here goes anyway...

DirectX is an API that needs to be installed on the local machine, right? I seem to remember a couple of years ago that OpenGL was also an installed API... correct?

So... just where is OpenGL contained now? Is it included in the OS, is it embedded in the game, is it somehow contained in drivers, or is it somehow completely transparent (in which case, I'd be interested in knowing how that is accomplished)?

For some reason, I just started to wonder. After all, we all install the latest DX version when it's released, but I don't recall installing a new OpenGL release or patch any time recently.

:(
 
In Windows, there is a file called opengl32.dll that serves as a software rasterizer if no hardware is present, or as a wrapper of sorts, sending commands an OpenGL program sends to it, to your video cards OpenGL driver. So essentially, the API is in your video driver...when you update your video driver, you are updating the OpenGL version on your computer.

I believe other OS's work in a similar way.
 
Cool, thanks.

I knew about four years ago there was an OpenGL that was installable, and I only recently began to wonder where it went.

So the API is contained in the driver for the most part... interesting. Why is DX handled so differently? Size (if so, why is it so much larger then?)

lol... questions, questions, questions!
 
Bigus Dickus said:
I knew about four years ago there was an OpenGL that was installable, and I only recently began to wonder where it went.

Quite possibly a very stupid question, but: That wouldn't be installable as in "Installabe Client Driver", would it?
 
Bigus Dickus said:
So the API is contained in the driver for the most part... interesting. Why is DX handled so differently? Size (if so, why is it so much larger then?)

AFAIK it is not that much different in D3D.
There's even a pure-device mode where all the calls are forwarded to the driver unfiltered.
So this is somewhat similar to the OGL.

When the software-emulation-layer is used it can provide:

1. Different version emulation. Eg. you have a DX7 driver but the game uses the DX8 interface, or you have a DX8 driver but the game uses the DX6 interface...

2. State filtering. The render states set don't go immediately to the driver, so there's less cost of redundancy. It also allows reading back the render states.

3. Software emulation of some of the features. The most important is the software T&L / VS.

All of these could be (and sometimes is) done in the driver of course, but it saves time for driver developers.
 
Originally there were two architectures for GL - NT supported both MCD (which I can't remember the acronym, mini-client-driver I think) and ICD, while 98 supported ICD only. The MCD was a smaller and easier implementation and the ICD was a more complete implementation.

I think all the modern cards are now using the ICD approach, which goes through Microsoft's opengl32.dll and that hands-off (almost completely) to the underlying DLL.

It's not a painless process. In particular, there's quite a lot of different hoops to be jumped through to make essentially the same DLL run with both 9x and 2k OS.
 
horvendile said:
Quite possibly a very stupid question, but: That wouldn't be installable as in "Installabe Client Driver", would it?
Yes, that's probably what it was. I remember it being very much like current DX installers... download the executeable, and it "installs" OpenGL on your system (of course, I quickly found out my graphics hardware didn't support OpenGL, but that's a minor detail...).

And now the ICD is contained within the video driver?
 
Bigus Dickus said:
horvendile said:
Quite possibly a very stupid question, but: That wouldn't be installable as in "Installabe Client Driver", would it?
Yes, that's probably what it was. I remember it being very much like current DX installers... download the executeable, and it "installs" OpenGL on your system (of course, I quickly found out my graphics hardware didn't support OpenGL, but that's a minor detail...).

And now the ICD is contained within the video driver?

You're thinking of the 'Install OpenGL' option on many OpenGL games? Oh, what's that installer called... I forgot :X Oh well...

In any case, yes, OpenGL is contained within the video driver.

There are a few reasons DirectX is a manual install as well as driver...

First off, starting with Win98, Windows itself uses DirectX. A lot. :) And thus, things like the generic VGA driver have to be prepared for a new DX; if you change video cards, your old driver won't cut it for the new card. :p

Second, DX has a weird hybridised approach to rendering, and has several layers to determine hardware capabilities.

Third, DX does a lot more than just DirectDraw/Direct3D video. There's DirectSound, DirectInput, DirectShow... :)
 
Tagrineth said:
You're thinking of the 'Install OpenGL' option on many OpenGL games? Oh, what's that installer called... I forgot :X Oh well...
GLSetup ;)
 
Win95 originally did not have an opengl32.dll, which you had to download from MS, IIRC. Opengl32.dll became part of the OS install with win98 and later.

The ICD (accelerated OpenGL, entire pipeline, compared to MCD, raster end only) is contained in a DLL. Usually it is named *ogl*.dll. It's part of the package, but not necessarily part of the video driver. There usually are dependencies on some services provided by the video driver.

The real dependency on the video driver is in NT4, where certain required OpenGL entry points (wgl functions) reside inside the 2D driver's DDI (functions reported back to GDI). W2K and WXP removed those requirements and allows the implementor to go the NT4 way or the 9x way.
 
Back
Top