![]() Check your GL renderer and version by calling glGetString (GL_RENDERER) and glGetString (GL_VERSION) - these are both GL 1.1 and so are not dependent on GLEW you can safely call them even if glewInit fails.Check that your context is current (e.g via wglMakeCurrent) before calling glewInit.Check that your context creation succeeded.Check that your Window creation succeeded.Check the actual error returned by glewInit as it will tell you what went wrong.In your case your should verify the following: Setting glewExperimental has nothing to do with whether or not glewInit succeeds what this does is relax some of the stricter (but more correct) extension verification. In this case it will return GLEW_ERROR_GL_VERSION_10_ONLY. The final reason why glewInit may fail is if your OpenGL implementation is GL 1.0 only (no modern GL implementation - not even the software implementation on Windows - is 1.0, but IIRC it will fail this check on an original 3DFX Voodoo graphics from 1996). If these checks fail it will also return GLEW_ERROR_NO_GL_VERSION. glewInit checks for the presence of a dot ('.') in the string, and also checks that the last character of the major version is between '0' and '9'. The next reason why glewInit may fail is if the GL version string is malformed. You called glewInit before creating your context or making it current. ![]() This is the first check done by glewInit and it will return GLEW_ERROR_NO_GL_VERSION. The main reason why GLEW will fail to initialize is if there is no GL context when you call glewInit. Fortunately the GLEW source code is available, so we can check that and determine possible causes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |