Dark Bit Factory & Gravity

PROGRAMMING => C / C++ /C# => Topic started by: Clyde on August 26, 2009

Title: [C] Where can I find The OGL headers
Post by: Clyde on August 26, 2009
Not that im going to rush straight it with ogl, but I've been looking and downloaded a few of the Nehe examples, but I can't find where the gl, glu and glaux headers and includes are. I presume they are present with the Platform SDK / NVidia drivers. And i believe im right in thinking i will have to add them to the VC++ directories?

I have to be carefull too, as my gfx card is a fx5500 which only supports pixel shaders 2.0. I read some where that M$ hasnt updated the headers since 1995.

Thanks for your help,
Clyde.
Title: Re: [C] Where can I find The OGL headers
Post by: Jim on August 26, 2009
The standard gl headers are included in the Platform SDK:
Code: [Select]
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>
You don't need to copy anything anywhere.
If you want to use opengl then you need to add opengl32.lib to your linker options.

You're right, these headers are pretty old, but it shouldn't matter to start with.  The basic API hasn't changed that much, it's the extensions that have been added.  If you find you need newer stuff here http://www.opengl.org/ (http://www.opengl.org/).

OpenGL doesn't care about your pixel shader version until you start writing shader programs.

Btw, You won't be able to use opengl with tinyptc_ext.

Jim

Title: Re: [C] Where can I find The OGL headers
Post by: Clyde on August 27, 2009
Thanks for the heads up dude.

I keep on getting fatal errors about not finding the gl/glaux.h directory.
I've added the opengl32.lib to the linker.
Title: Re: [C] Where can I find The OGL headers
Post by: TinDragon on August 27, 2009
as far as i am aware glaux.h isnt in the VC sdk's anymore, it was said to be buggy and abit shite anyway. There's a replacement for it on nehe's site but i think it was mostly just used to load bmps in the tut's anyway.
Title: Re: [C] Where can I find The OGL headers
Post by: Jim on August 27, 2009
Definitely no new code should start using glaux.  That's been the case for at least 15 years.

Mark J Kilgard's glut is an excellent high level OpenGL toolkit.
http://www.opengl.org/resources/libraries/glut/spec3/spec3.html (http://www.opengl.org/resources/libraries/glut/spec3/spec3.html)

Jim