Re: glGet issues
"Mike C. Fletcher" <[email protected]> Thu, 14 Feb 2013 11:04:31 -0500
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <[email protected]> |
On 13-02-07 09:29 AM, Tomasz WesoĊowski wrote:
> Hello,
>
> I've noticed that this call:
>
> out = GL.glGetTexParameteriv(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_SWIZZLE_B)
...
> This is probably because the list of parameter sizes hardcoded in
> glget.h is a bit out-of-date:
>
> TEX_PARAMETER_SIZES = {
> simple.GL_TEXTURE_MAG_FILTER: (1,),
> simple.GL_TEXTURE_MIN_FILTER: (1,),
> simple.GL_TEXTURE_WRAP_S: (1,),
> simple.GL_TEXTURE_WRAP_T: (1,),
> simple.GL_TEXTURE_BORDER_COLOR: (4,),
> simple.GL_TEXTURE_PRIORITY: (1,),
> simple.GL_TEXTURE_RESIDENT: (1,)
> }
Yes, basically all of the image manipulation code is a hand-coded
wrapper around the raw operations. What needs to happen is parsing the
various spec files looking for:
New Tokens
Accepted by the <...> parameter of ... GetTexParameteriv
and generating a line like this:
glget.addGLGetTexParameterConstant(GL_TEXTURE_SWIZZLE_B,(1,))
in the wrapper (currently these are added to the hand-coded wrappers).
Currently I do those by hand, but that just isn't keeping pace with the
various extensions (or even core, really). Each of those calls actually
needs review to see what size the result should be, too.
Lastly, the image wrapping code likely needs to be more robust to be
able to handle un-declared constants.
> Sadly, I aparrently can't call this function "normally", without the
> ctypes enhancement:
>
> out = ctypes.c_int()
> GL.glGetTexParameteriv(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_SWIZZLE_B,
> ctypes.byref(out))
If you need the raw operation:
GL.glGetTexParameteriv.wrappedOperation
which is still ctypes, but doesn't have the wrapper code applied.
Hope that helps,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users