Re: Error loading extensions on forward compatible context: GL_NUM_EXTENSIONS invalid_enum
Alejandro Segovia <[email protected]>
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAAXrc9M6hi+dZBesbQ4izVG38LVcKi1n29df4tSbJi4=hurSBw@mail.gmail.com> |
Hello TJ,
=== The code
> #!/usr/bin/env pythonw
> from __future__ import division
>
> from ctypes import *
>
> from glfw import *
> from OpenGL.GL import *
>
> # Initialize GLFW
> if not glfwInit():
> raise RuntimeError("glfw failed to initialize")
>
> # Open a 300x300 OpenGL window with an OpenGL 3.2 Core Profile context
> glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3)
> glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 2)
> glfwOpenWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE)
> glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE)
> if not glfwOpenWindow(300, 300, 0,0,0,0,24,0, GLFW_WINDOW):
> glfwTerminate()
> raise RuntimeError("glfw could not create window")
>
>
> # This is a test of glGetIntegerv. It doesn't crash when I call it directly
> count = glGetIntegerv( GL_NUM_EXTENSIONS )
> print "count", count
>
> # Error occurs here
> arrayID = GLuint()
> glGenVertexArrays(1, byref(arrayID))
>
This might sound incredibly silly, but may be worth testing. Have you tried
calling glGenVertexArrays like so?:
arrayID = glGenVertexArrays(1)
Some PyOpenGL functions are "Pythonized" and can cause problems.
Alejandro.-
--
http://alejandrosegovia.net
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users