noob question

Started by
12 comments, last by Achilleos 16 years, 10 months ago
Quote:Original post by RyanZec
I want to use OpenGL 2.0 stuff. I have Visual Studio 2005 which has the OpenGL headers. Do I need anything else to start using OpenGL specific stuff?

Two things; you need "glext.h" and your video driver must support OpenGL v2.0 or greater.

Get the header from OpenGL Extension Registry
Advertisement
Getting started
http://www.opengl.org/wiki/index.php/Main_Page
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by RyanZec
Maybe I am missing the point. When OpenGL gets updated do I not have to update mu header files or any other header/source file on my computer to access the new version?


not really, glext.h is the only one you would want to update.
It is possible to use extensions without it though (but you would have to replicate the defines in glext.h or use the numerical values for everything so its really not worth the effort)
[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!
i am using visual studio 2005 too. microsoft delivers the opengl.h version 1.1 with it. and these headers are really old. thats the reason why the architecture review board decided to bring in extensions in order to add new stuff to the api. i you use glew (which i use too) everything is great. immediatly after including the extension wrangler header files you can use visual studios intellisense to scroll through the available functions and question the graphic hardwares driver if a specific extension is supported.

you should not have opengl 1.5, because it is not included by anything microsoft delivers. maybe you received the version number from the version string using:
char* glInfo = (char*)glGetString(GL_VERSION);
in this case you only got the version number of the opengl implementation brought to you by the vendor of your graphics hardware.

so:

use glew and maybe check some version and extensions stuff using the free extensions viewer downloadable from http://www.realtech-vr.com/

greetz.

This topic is closed to new replies.

Advertisement