PDA

View Full Version : OpenGL Architecture



egrath
07-20-2004, 02:47 AM
Hi,

i am looking for a overview how the opengl components plug together (library, graphic driver, etc.) - i found such a graphic on the apple developer site, but i am seeking such a description for windows and unix-like operating systems.

Apple:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL/art/opengl02.gif

Has anyone a idea where to look for such informations?

Thanks, Egon

Obli
07-20-2004, 03:40 AM
Linux has a thing called MESA, which is a 100% SW driver for the GL. It's not so much evolved, and leaves the HW completely out of the picture as far as I know.
I guess having all the details is rather hard, if possible at all. Most vendors won't like having source leaked because it's industrial secrets.
I heard however that Matrox has a completely open source hardware for G400 (or maybe G200?) which works pretty well, but I'm not sure that's true.

mikael_aronsson
07-20-2004, 04:08 AM
Mesa work on a number of number of platforms including Windows, it is only software but it includes almost every extension in existence and supports the latest OpenGL features.

Then there is of course the sgi sample implementation.

Mikael

egrath
07-20-2004, 04:52 AM
ok, thats clear now.

there is another question which makes me study: How does the OpenGL Runtime Engine know which Operations can be hardware accelerated? Has the Driver to "register" to the Engine and tell what things he can accelerate? And the others are rendered through software?

For example, in the future when my opengl programming knowledge advances, can i use Cg Programs inside my Application even if the Hardware does not provide acceleration for this (I own a old GeForce2 ... :-/)

Egon

Obli
07-20-2004, 05:08 AM
Originally posted by egrath:
there is another question which makes me study: How does the OpenGL Runtime Engine know which Operations can be hardware accelerated? Has the Driver to "register" to the Engine and tell what things he can accelerate? And the others are rendered through software?It doesn't know, it assumes. A driver written for a specific video card will try to run in HW everything it can, possibly somewhat more or less.

Whoops, maybe by "OpenGL Runtime Engine" you mean "out of driver applications" aka "your app" then there's glGetString(GL_EXTENSIONS) and some parsing. There's also an extension proposed which should look like glIsSupported(GL_BLAH), but it has some problems.

Originally posted by egrath:
For example, in the future when my opengl programming knowledge advances, can i use Cg Programs inside my Application even if the Hardware does not provide acceleration for this (I own a old GeForce2 ... :-/)Probably not because implementing HW emulation is expensive and does not pay as much as spending the same time in optimizing it. There may be some performance issues involved.
For example, ARB_VP is actually emulated on my old GF2 and on GF4MX. This is good.
ARB_FP however is not: performance would be so bad it would be unusable anyway.
For complex things, such as GLSL or CG, running it emulating could be very complex (CG targets down to NV2x family as far as I can remember).

egrath
07-20-2004, 05:55 AM
Thank you Obli for your fast response, it made me seeing things a little bit cleaner on how those things work together.

Bye, Egon

dorbie
07-22-2004, 12:41 PM
That diagram is fairly generic and pretty much applies to all OpenGL implementations on any playform.

For Linux specific info you could start here: http://dri.sourceforge.net/cgi-bin/moin.cgi/

However be warned that NVIDIA drivers use their own rendering infrastructure. It is binary compatible with applications and is the sort of thing applications developers needn't bother about. From a programming point of view the ABI is identical and standard.