I have a problem updating GL headers. Mostly I want to access the function glCompressedTexImage2D, but my gl headers are really old, and I don't think the function exists in these headers. So I tried to update the file gl.h, but I got a lot of errors. I tried updating software for graphics cards, among other things. Can anyone help?
glCompressedTexImage2D
gl.h
I have a little problem updating GL headers.
, . Windows , OpenGL-1.1, . - GLEW. GL/glew.h GL/gl.h. OpenGL , , glewInit().
GL/glew.h
GL/gl.h
glewInit()
, Windows OpenGL (1.2?). GLEW Glee, (GL_ARB_TEXTURE_COMPRESSION glCompressedTexImage2D). , .
GLEE:
#include <gl/GLee.h> if (GLEE_ARB_TEXTURE_COMPRESSION) { glCompressedTexImage2D(...); } else { // the extension is not available, use a different method }
, GLEE , ( GLEW). . , :), , , ( ), .
, , , :
PFNGLCOMPRESSEDTEXIMAGE2DPROC p = NULL; const char* string = glGetString(GL_EXTENSIONS); if (strstr(string, "GL_ARB_texture_compression") != NULL) p = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)wglGetProcAddress("glCompressedTexImage2D");
: http://www.opengl.org/registry/ glext.h wglext.h
. Windows OpenGL 1.1.
GLEW (GLEE , ...)