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?
Include glext.h file. If you don’t have it, you can download it here: http://www.opengl.org/registry/api/glext.h
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
Is there a specific method in which I should download glext.h?
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.
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:
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”?
Oh, I see. You mean right click the link. . . I didn’t know you could do that. :o
Thanks! It works now.