OpenGL updating???

Started by
13 comments, last by Eitsch 17 years ago
Hi. Now that I take a CG corse at the university, i´m forced to learn openGl. The main differences compared to Dx are the releases. I was everywhere. Where can I get the newest OpenGl files? The newest I found was at SGI. The OpenGl Sdk. But the version inside was just 1.2. Also the ext ogl files. But for general understanding, and I´m sure this topic is well discused, but, I have a ATI graphics card. Now I just found a SDK at the AMD/ATI website where some ATI files were inside. What are these files for? What is the difference between the functions in this files and those of the standard ogl version(from SGI?)? I mean, what if i use a *_*_ATI or ATI_*_* or whatever function, is it also available on other manufacturers graphics cards? I think so... But, come on, than this isn´t better than using D3D. Where is the advantage of using those extensions when they are so hardware dependent? From the faq list of gamedev, I found the article "Beyond ogl 1.1" or so, and it says that its save to use functions with ARB or EXT suffix or prefix. Does this mean, this runs on every graphics hardware althought when functions of this kind are defined in the ATI header files?! I'm also asking, because everywhere I read about OpenGL 2.0, but I just have found 1.2... I'm mean, come on, whats wrong. Where can I find these libs and headers? Please, I need suggestions what files I should use... Is it safe to use the ati files for example? Oh man, D3D was so good to me, and now I have to use OpenGL. :( Now I can program hardware specific apps instead of os specific stuff(Dx, you understand). But, although all this happens to me, I want(forced to)use it, because I'm also interested in it! I need some help please! Thanks Alex
Advertisement
Accessing the OpenGL API is a little different than Direct3D. With Direct3D you download the SDK, point your compiler to the headers and point your linker to the libs, pretty much like any other SDK out there. Then as long as the user has the runtime you built against, your game should run.
With OpenGL, typically your compiler will come with the headers and the lib file, but they will likely be out of date (usually OpenGL 1.2, possibly 1.4). You can get up to date headers with the latest and greatest extensions from places like SGI and opengl.org, but you will have to obtain a function pointer at runtime using calls such as GetProcAddress. The "run time" for OpenGL is provided by the guys who produce the driver for your video card. This is where the procedures live, and different drivers are going to have different levels of support for extensions. So if you are using an extension, you need to make sure the driver supports it at runtime. To make this easier there are libraries such as GLEE. So the basic procedure is, get GLEE so that you will have the latest OpenGL headers and so you don't have to go through contortions to load extensions. Make sure your compiler has a gl.h and an opengl32.lib so that you have "core" OpenGL functionality. Make sure you test the availability of extensions at runtime before you use them so your program does not crash. Make sure you have the latest driver from your video card vendor so that you will have the latest OpenGL runtime. Couldn't be simpler ;).
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
Hi CodeMunkie.

This sounds simple... You are right.
You said, that I should use the latest graphics drivers.
But how does new functionality conincid with old versions of ogl???
In the ati sdk, there is no opengl.dll or opengl32.dll. So, how can new
functionality be utilized, when I'm just running with the opengl32.dll
from version 1.1. What is with shader support?
In D3D I just used D3DXCompileShaderFrom*(...) and Create*Shader() than I could include it with Set*Shader()...
Now, how is this done in ogl?

But maybe this becomes clearer, when I have used the extensions...
But now, everything is a bit confusing.

Alex
Ok, GLee. I quickly found it, because I knew that it is
located in the OpenGL Sdk at opengl.org.

Now, this sounds just better. "up to 2.1".

Alex
This is actually a good question man, I had a lot of trouble myself trying to get the latest version of OpenGL.

I’m still slightly confused about the subject, for instance, if a game boasts that it supports “OpenGL 2.1”, exactly how many extensions from the latest spec is it required to implement to make such a claim?
Oh man....

First. OpenGL support is double ended. 1) you need the proper stuff to compile it, and 2) you need the proper drivers to run it.

1) The proper files, have been mentioned. I'd also direct you to GLEW (i dont know if this is the same as GLEE)
inorder to get all the function pointers for everything all ready to go. If you look in the headers, it is broken into sections,
so it should be easy to see what extentions form the bases of each core release (ie 2.0, or 1.1).

And WGL_ extention will be available on ALL windows machines WITH approprite hardware support.
And GLX_ extentions will be available on ALL linux-xsever machines WITH appropriate hardwhare support.
Any NVIDIA_ or ATI_ extention will ONLY be available on that vendors cards, of the approriate hardware level.

Shader support is throught the ARB_vertex_program and ARB_fragment_program extentions OR in GL2.0 glCreateShader/glCompileShader


2) using opengl support at the highest version is as easy as getting the latest drivers for you card. you are done
OpenGL has different "levels", I guess you could say, of extensions. You have hardware specific extensions supported only by the vendor that developed the extension (or possibly by a very few others), and then you have extensions that are supported by multiple vendors. An extension will have a prefix that describes where it came from and can also give you a clue about how widely it is supported. Here is list of some of the prefixes (just to name a few):

ARB – Extensions officially approved by the OpenGL Architecture Review Board
EXT – Extensions agreed upon by multiple OpenGL vendors
HP – Hewlett-Packard
INTEL – Intel
NV – NVIDIA corp
ATI - ATi/AMD corp
SGI – Silicon Graphics
WIN – Microsoft

Once enough vendors agree to support a certain extension, that extension gets promoted from vendor specific to EXT or ARB. As a developer, if you want to support the largest number of different cards and vendors, you should go for EXT and ARB extensions.
You probably know that Direct3D is governed by Microsoft. OpenGL is governed by an architectural review board. This is just a group of folks from different companies who control the direction of OpenGL. Periodically, the architectural review board will meet and decide to release a "new version" of OpenGL. At that time certain ARB and EXT extensions will be promoted to the OpenGL core. Almost all functionality added after OpenGL 1.0 started life as an extension. Once an extension is promoted to core OpenGL, it must be supported by any implementer who says they support that version of OpenGL. If a game says they support OpenGL 2.1, then it means they are using only what is considered the core functionality of version 2.1. In other words, they do not use extensions that were not considered part of the core of OpenGL 2.1. It also means as long as your driver supports OpenGL 2.1, you will be able to run the game because if a vendor implements OpenGL 2.1, they must implement all of the core functionality. They may also implement additional, non-standard extensions, but the core must be there or it can not be called OpenGL 2.1 (or whatever version the implementation is saying they support).

There is a really cool program called GLview over at www.realtech-vr.com. It will show you a list of core features by OpenGL version and tell you which ones are supported by your current driver. It will also take you to the specification for a particular extension so you can read all about it.

[Edited by - CodeMunkie on April 5, 2007 8:51:24 PM]
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
Quote:You said, that I should use the latest graphics drivers.
But how does new functionality conincid with old versions of ogl???
In the ati sdk, there is no opengl.dll or opengl32.dll. So, how can new
functionality be utilized, when I'm just running with the opengl32.dll

with nvidia the gl driver is called nvoglnt.dll, i assume ati is something like atiogl32.dll, this does all the drawing not opengl32.dll, opengl32.dll is an old software only opengl1.2 version from many years ago
Quote:Original post by directNoob
Ok, GLee. I quickly found it, because I knew that it is
located in the OpenGL Sdk at opengl.org.

Now, this sounds just better. "up to 2.1".

Alex


You don't really need to download an SDK. Your compiler comes with everything you need to use OpenGL 1.1 already. You just need to get glext.h to use the latest extensions, and GLEE if you want to use those extensions easily!

GLEE is at: http://elf-stone.com/glee.php
Quote:Original post by KulSeran
Any NVIDIA_ or ATI_ extention will ONLY be available on that vendors cards, of the approriate hardware level.


Not quite true, My ATI X1600 mobile card thingy has support for some gl_nv extensions and my GF7800GTX card has support for a bunch of gl_ati extensions.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement