p-blomberg/yamosg — Issue #4: OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenFramebuffers
Author: p-blomberg
Created: 2011-12-28 11:36:25+00:00
State: open

Reported by project member ext@sidvind.com, Jul 21, 2011
What steps will reproduce the problem?
1. Run client on GPU driver which does not implement OpenGL 3.3

{{{
Traceback (most recent call last):
File "client.py", line 398, in
client = Client()
File "client.py", line 172, in __init__
self._game = GameWidget(self, resolution)
File "/home/ext/workspace/yamosg/client/game.py", line 104, in __init__
FBOWidget.__init__(self, Vector2i(0,0), size)
File "/home/ext/workspace/yamosg/client/ui/__init__.py", line 116, in __init__
self._fbo = glGenFramebuffers(1)
File "/usr/lib/pymodules/python2.7/OpenGL/latebind.py", line 45, in __call__
return self._finalCall( *args, **named )
File "/usr/lib/pymodules/python2.7/OpenGL/wrapper.py", line 573, in wrapperCall
result = self.wrappedOperation( *cArguments )
File "/usr/lib/pymodules/python2.7/OpenGL/platform/baseplatform.py", line 340, in __call__
self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenFramebuffers, check for bool(glGenFramebuffers) before calling
}}}

Must check if glGenFramebuffer and friends is supported directly by the driver, then if {ARB,EXT}_framebuffer_object is supported and switch to it if possible. If not it should fail with a more useful message.