Re: [PyOpenGL-Users] OpenGL 3.2 and core profile compatibility
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2010-04-17 22:13:02
|
Lionel Data wrote:
> There's actually a problem with the way the extensions are retrieved.
> The hasGLExtension() function returns always 'False'.
> This is due to the fact that glGetStringi returns a GLubyteArray
> object, and the AVAILABLE_GL_EXTENSIONS list is full of instances of
> GLuByteArray, instead of strings.
>
> I'm quite new to PyOpenGL and the open source community, so I'm not
> too good with the collaborative work stuff. Should I report these bugs
> somewhere more visible or patch it myself and commit it somehow ?
bzr is a distributed source control system, and LaunchPad lets you
publicly expose your branches with a (free) account. If your patches
are small, you can simply commit them to your local bzr branch and do a:
bzr send
which will create a merge-capable patch I can use to pull in your
changes. If you want to do more involved changes, branching on
LaunchPad and doing a merge-request there is likely more appropriate
(I'll accept bzr-send patches even if they're large, it's just that we
may wind up with some back-and-forth as we revise it, and a public
repository makes that easier).
Particularly for this kind of hardware-specific stuff, I'd really
appreciate any contributions.
Have fun,
Mike
>
> 2010/4/16 Lionel Data <lio...@gm...
> <mailto:lio...@gm...>>
>
> Hum sorry I skipped the part with the bzr head :)
> Forget about the glGetInteger, it works fine with the head version.
>
> So I just tested, and I still get unexpected error 1280 after
> import OpenGL.GL.ARB.vertex_array_object.
> What actually happens is that I import this module at a function
> level (so that the context is already created) and the next OpenGL
> call I try to make raises the 1280 error.
>
> My guess is it does not work because there is still glGetString(
> GL_EXTENSIONS ).split(), even if it is in a try. Since the error
> is not reported with an actual exception right away, but with the
> glCheckError function.
>
> It works fine after commenting the 'try' statement.
>
> Cheers,
>
> Lionel
>
>
> 2010/4/16 Lionel Data <lio...@gm...
> <mailto:lio...@gm...>>
>
> Ok, so apparently there is a problem with glGetInteger()as
> well and I can't really understand it.
> Here is what I get.
>
> print glGetInteger(GL_NUM_EXTENSIONS)
> File
> "/home/lionel/work/ets/python26/lib/python2.6/site-packages/PyOpenGL-3.0.1-py2.6.egg/OpenGL/latebind.py",
> line 45, in __call__
> return self._finalCall( *args, **named )
> File
> "/home/lionel/work/ets/python26/lib/python2.6/site-packages/PyOpenGL-3.0.1-py2.6.egg/OpenGL/wrapper.py",
> line 570, in wrapperCall
> cArgs = tuple(calculate_cArgs( pyArgs ))
> File
> "/home/lionel/work/ets/python26/lib/python2.6/site-packages/PyOpenGL-3.0.1-py2.6.egg/OpenGL/wrapper.py",
> line 373, in calculate_cArgs
> yield converter( pyArgs, index, self )
> File
> "/home/lionel/work/ets/python26/lib/python2.6/site-packages/PyOpenGL-3.0.1-py2.6.egg/OpenGL/converters.py",
> line 194, in __call__
> return self.arrayType.zeros( self.getSize(pyArgs) )
> File
> "/home/lionel/work/ets/python26/lib/python2.6/site-packages/PyOpenGL-3.0.1-py2.6.egg/OpenGL/converters.py",
> line 233, in getSize
> raise KeyError( """Unknown specifier %s"""%( specifier ))
> KeyError: ('Unknown specifier GL_NUM_EXTENSIONS (33309)',
> 'Failure in cConverter <OpenGL.converters.SizedOutput object
> at 0xb5a8186c>', (GL_NUM_EXTENSIONS,), 1,
> <OpenGL.wrapper.glGetIntegerv object at 0xb5a0356c>)
>
> This looks a bit too deep for me.
>
> Lionel
>
> 2010/4/16 Lionel Data <lio...@gm...
> <mailto:lio...@gm...>>
>
> Hi,
> Shall I modify the code of the hasGLExtension and submit
> you the patch ?
> I was thinking about checking for the flag
> FORWARD_COMPATIBLE_ONLY, and, if set,
> change the glGetString(GL_EXTENSIONS) to :
> extensions_count = glGetInteger(GL_NUM_EXTENSIONS)
> for i in range(extensions_count):
>
> AVAILABLE_GL_EXTENSIONS.append(glGetStringi(GL_EXTENSIONS, i))
>
> Does that sound good ?
>
> 2010/4/16 Mike C. Fletcher <mcf...@vr...
> <mailto:mcf...@vr...>>
>
> Lionel Data wrote:
> > Hi,
> >
> > this is my first post to this mailing list. I'm
> currently struggling
> > quite hard to have a fresh OpenGL 3.2 compliant
> mini-engine using
> > PyOpenGL.
> >
> > I wanted to use the vertex array objects provided by
> the core profile.
> > As far as I know, it shouldn't be an extension
> anymore, but I may be
> > mistaken.
> > Anyway, I found the actual functions in the
> > OpenGL.GL.ARB.vertex_array_object module. However,
> it seems that,
> > somewhere in PyOpenGL, the function
> glGetString(GL_EXTENSIONS) is
> > called. Since I created an OpenGL3.2 core context,
> and that the
> > GL_EXTENSIONS enum is now deprecated, I get an
> unexpected error 1280
> > (bad enum), and my engine crashes.
> >
> > Is there something I am missing ?
> Just that the utility code that checks for extensions
> wasn't tested with
> a machine that can do legacy free. I've attempted to
> update the
> extension-checking functionality to provide a legacy-free
> implementation, but I don't have any machine with
> glGetStringi available
> (i.e. I don't have a 3.x capable card), so I can't
> actually test that it
> works. If you can test with bzr head, it would be
> helpful.
>
> HTH,
> Mike
>
> --
> ________________________________________________
> Mike C. Fletcher
> Designer, VR Plumber, Coder
> http://www.vrplumber.com
> http://blog.vrplumber.com
>
>
>
>
>
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|