glext.h won't work

Started by
4 comments, last by NepenthesRajah 21 years, 6 months ago
My original goal is to do multitexturing. I've come across several tutorial and I got stuck right at the beginning. After looking around and finally found the rare file glext.h, it seems to play with my nerves. Barely the problem : #include <gl\glut.h> #include <gl\gl.h> #include <gl\glu.h> #include <gl\glaux.h> #include "glext.h" It tells me that : PFNGLCOLORSUBTABLEEXTPROC is previously declared in gl.h... Is that normal ? Got I the right glext.h file ? Without glext.h the code will not recognise other PFNSOMETHING related to multitex. What do I do ? Some kind of ifdef ? thank you... [edited by - NepenthesRajah on September 30, 2002 7:29:00 PM]
Advertisement
http://oss.sgi.com/projects/ogl-sample/registry/
glext can be gotten from here

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
Ok, in fact That was the file I get.
Anyhow, I altered the glext.h and quoted the declaration that was doubled. It seems to compile finely. I don''t know why is all that... I''m sure that you, which are using glext.h, weren''t forced to do this...

Nep.
Are you using MingW? I had the same error when including SDL''s OpenGL header in my project. It seems to happen anytime you include any gl header file instead of the default one the compiler provides. I was just experimenting with MingW so I didn''t investigate further - just went back to VC (which I do hope to ditch in favor of gcc one of these days).
>>Ok, in fact That was the file I get.
Anyhow, I altered the glext.h and quoted the declaration that was doubled. It seems to compile finely. I don''t know why is all that... I''m sure that you, which are using glext.h, weren''t forced to do this...<<

u shouldnt do that, do a search in ALL the included files for the doubly declared function, the one in glext.h is correct (Dont change that file)
the other is the one that should be gotten rid of, i guess someone else in their code declared the function somewhere instead of using #include "glext.h".
btw i stick glext in the same directory as the other opengl headers + do this at the top of my projects

#include <GL/gl.h>
#include <GL/glext.h>

this way when a new glext.h comes out (it happens very often) just copy it into the GL directory + all your projects benifit

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
>Are you using MingW?
yes I do. it''s MingW on Dev-C++.

I know I shouldn''t have to manipulate the file. but the two declarations are in gl.h and glext.h...and nowhere else.
this is lines 3214@glext.h and 1493@gl.h

I would place glext.h into the Gl/ directory #include files but this way I need not to alter it, as it could be used by another code and would lack a declaration...

Finally its odd that the problem stands only for one declaration.(when I quote it everything is fine...)



actually gl.h is #included in glut.h so my two lines are:
#include <Gl/glut.h>
#include <Gl/glext.h>

Very weird...

This topic is closed to new replies.

Advertisement