Re: [PyOpenGL-Users] glGenFramebuffers undefined
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2012-09-15 05:03:57
|
On 12-09-12 02:13 PM, Chris Weisiger wrote:
> (Sorry for the spam to the moderators -- I hadn't finished processing
> my membership before sending the first copy of this message)
>
> I have a program I wrote that works fine on OSX*, but is failing on
> Windows when I call gnGenFramebuffers. The exact error message is:
>
> Attempt to call an undefined alternate function (glGenFramebuffers,
> glGenFramebuffersEXT), check for bool(glGenFramebuffers) before
> calling
>
> I can't figure out why this isn't working. If I do try
> glGetBoolean(glGenFramebuffers) then I get this error:
Um, that should be:
bool( glGenFramebuffers )
or you can just use it in a boolean context, like:
if not self.haveInited:
if not glGenFramebuffers:
print 'No glGenFramebuffers implementation found'
raise SystemExit( 1 )
so the problem becomes, why doesn't your context have glGenFrameBuffers
or glGenFrameBuffersEXT. You can see the extensions available to the
current context like so:
if not self.haveInited:
for ext in glGetString( GL_EXTENSIONS ).split():
print ext
print glGetString( GL_VERSION )
if not glGenFramebuffers:
print 'No glGenFramebuffers implementation found'
raise SystemExit( 1 )
which will print out the name of each extension on the system, and then
the core version. GL_EXT_framebuffer_object, GL_ARB_framebuffer_object
or a core version of 3.0 or above *should* provide the entry point.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|