I'm having a bit of an issue updating my GL headers. Basically I want to access the function glCompressedTexImage2D
but my gl headers are really old and I don't believe that function exists in those headers. So I've tried to update my gl.h
file but I get loads of errors. I've tried updating my graphics card software among other things. Can anyone be of help?
Step 1: GLUT Installation (only needs to be done once) back to top ↑ Windows comes with OpenGL, and Visual Studio comes with the OpenGL libraries, but neither of them comes with GLUT. Get the newest version of GLUT here: GLUT 3.7. 6 for Windows.
The OpenGL library can usually be found by the name opengl32. dll under the \system32 folder, located in your system's root folder (usually c:\windows). Headers compatible with OpenGL are bundled with most compilers.
In Visual Studio, right-click on your project, and select "Open Folder in File Explorer...". A folder will appear that contains the files for your project. Drag the openGL files from the folder you created in step 1, into this folder.
I'm having a bit of an issue updating my GL headers.
That's because you're not supposed to do this. In Windows anything beyond OpenGL-1.1 is gathered through the extension mechanism. The easiest way to access this is through GLEW. Install this and use GL/glew.h
instead of the regular GL/gl.h
. Then after a OpenGL context has been created the first thing to call is glewInit()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With