PDA

View Full Version : GL_UNSIGNED_INT_8_8_8_8 is undefined



paradoxresolved
09-25-2011, 01:44 PM
I'm attempting to use glTexImage2D in Visual Studio 2010 on a Windows XP system, but I get GL_UNSIGNED_INT_8_8_8_8 is undefined (along with several others, like GL_BGRA). Is there some kind of update I need?

_arts_
09-26-2011, 01:43 AM
Include glext.h file. If you don't have it, you can download it here: http://www.opengl.org/registry/api/glext.h

paradoxresolved
09-26-2011, 10:01 AM
Thanks! :)

paradoxresolved
10-05-2011, 01:36 PM
I just got around to downloading glext.h. Unfortunately, we I add a file glext.h and copy all the contents of the online file into it, I get the following error:

fatal error C1070: mismatched #if/#endif pair in file 'c:\cppprograms\new interface\glext.h'

Is there a specific method in which I should download glext.h?

_arts_
10-06-2011, 12:47 AM
You should save it where your GL headers reside, at the same place than gl.h is and include it in your program after <Windows.h> and after <gl.h>.

Alternatively, you can use glew headers... But I'd like to understand why it does not work.

paradoxresolved
10-06-2011, 06:19 PM
Perhaps I'll look into the glew headers.

I'm not sure why the glext.h file isn't working. :( I went to the website, hit "select all", "copy", and then pasted the code as-is into my own file named glext.h. The file was completely blank prior to it. Visual Studio 2010 insists there is a #endif mismatch. :sorrow:

Alfonse Reinheart
10-06-2011, 07:04 PM
I went to the website, hit "select all", "copy", and then pasted the code as-is into my own file named glext.h.

Why do you do that as a means of "download"? Why don't you just download the file? You know: right-click and select "download"?

paradoxresolved
10-06-2011, 08:36 PM
Oh, I see. You mean right click the link. . . I didn't know you could do that. :o

Thanks! It works now.