Hello,
J `s`'d need you like me some advice concerning the use of OpenGL extensions in QT.
Then voila, it is recommended (I think he) d `load autommatique use GLEW to directly load all extensions.
However, there is a problem with inclusion of `error as before declaring gl.h glew.h. But for certain uses QT widget `s inclusion of these files gl.h. .. Thus if I have two files that I want to use features of the extension and glew and that these same files must be included in another, there is always this problem of `inclusion.
L `Another method is to load the functions manually. Is this the right way to do?
Code:1. main.h 2. 3. # include <GL\glext.h> 4. 5. PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL; 6. PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL; 7. 8. glActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress ( "glActiveTextureARB"); 9. glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress ( "glMultiTexCoord2fARB");Thank you.Code:1. another file: 2. 3. 4. extern const PFNGLACTIVETEXTUREARBPROC glActiveTextureARB; 5. extern const PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB;



Reply With Quote
Copyright Techfuels
Bookmarks