This systems works fine with pygame, glut and glfw using openGL 2.1, however as soon as I try to force openGL 3.2, openGL immediately fails. Here is my glfw implementation, I also have a GLUT program in similar sytle which fails with the same error.
class GlfwDisplayController(object):
def __init__(self,resolution):
glfw.init()
self._resolution = resolution
w,h = self._resolution
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 2)
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL_TRUE)
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE);
self._window = glfw.create_window(w,h,"GLFW openGL render",None,None)
glfw.make_context_current(self._window)
def kill(self):
glfw.terminate()
def display(self):
glfw.swap_buffers(self._window)
glfw.poll_events()
if __name__ == "__main__":
from OpenGL.GL import *
import glfw
testContext = GlfwDisplayController( (500,500) )
#testing to make sure the context was created
glMatrixMode(GL_MODELVIEW)
Here is the error output. This works fine with openGL 2.1 if I comment out all of the glfw.window_hint() calls
Traceback (most recent call last):
File "src/rendering/Display_controller.py", line 134, in <module>
glMatrixMode(GL_MODELVIEW)
File "/usr/local/lib/python2.7/site-packages/OpenGL/platform/baseplatform.py", line 402, in __call__
return self( *args, **named )
File "errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src/errorchecker.c:1218)
OpenGL.error.GLError: GLError(
err = 1282,
description = 'invalid operation',
baseOperation = glMatrixMode,
cArguments = (GL_MODELVIEW,)
)
TO my knowledge, OSX is fully updated, including graphics drivers. Is there anything special I have to do in the system to access openGL 3.2+? I'm thoroughly sick of working with glsl 1.2 :(
glxinfo output:
$ glxinfo | grep openGL
OpenGL vendor string: Intel Inc.
OpenGL renderer string: Intel(R) Iris(TM) Graphics 6100
OpenGL version string: 2.1 INTEL-10.25.17
OpenGL shading language version string: 1.20
OpenGL extensions: