Re: [PyOpenGL-Users] Error loading extensions on forward compatible context: GL_NUM_EXTENSIONS inva
Brought to you by:
mcfletch
From: Alejandro S. <as...@gm...> - 2011-09-13 19:08:47
|
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 |