Re: Missing definitions? GLbyte, GL_R8UI

Ian Mallett <[email protected]> Mon, 6 Jan 2014 01:05:33 -0800
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAG4NV=uV=+Ebk7H3nrXHLLuK4SW4iuw4om4ymJ-89_Y-=EJgfA@mail.gmail.com>
On Sun, Jan 5, 2014 at 1:32 AM, Carl Olsson <[email protected]> wrote:

> I've just started using PyOpenGL and I've come across a couple of
> definitions that I can't find anywhere.
> I'm using PyOpenGL 3.1a1 with Python 3.3.
>
> The culprits are:
> GL_R8UI (sized internal format enum)
> GLbyte (type)
>
> Have I missed importing a package? My PyOpenGL related imports:
> import OpenGL
> OpenGL.
> FORWARD_COMPATIBLE_ONLY = True
> OpenGL.ERROR_ON_COPY = True
> from OpenGL.GL import *
> from OpenGL.arrays import vbo
> from OpenGL.GL import shaders

I don't know if this is correct, but my guess is that, since this came from an
extension <http://www.opengl.org/registry/specs/ARB/texture_rg.txt>, you
will either need to use OpenGL 3.0+ or load the extension. For the latter,
while I haven't used PyOpenGL for my low-level graphics work in years, but
my *guess* would be that "from OpenGL.GL.ARB.texture_rg import *" would
work (for me, at least, that loads the required symbol).

Regarding "GLbyte", that sounds like a C typedef. Passing integers instead
probably will work fine because of PyOpenGL's wrapping, and the associated
token for data is "GL_BYTE". For specifics, code would also be helpful.

Note also regarding forward compatibility that the consensus seems to be
not to use it (e.g.<http://www.opengl.org/wiki/Creating_an_OpenGL_Context_%28WGL%29#Create_Context_with_Attributes>).
I don't know that much about it myself, but I suspect that outside of
portability conformance testing, the flag has little modern use.

All that said, if, in addition to PyOpenGL, you're new to OpenGL concepts
in general, you probably don't want GL_R8UI or other similar
integer-texture tokens anyway, as they're generally only useful for
creating shader mutex textures or other monstrosities for advanced shading
techniques. At the risk of self-promotion, I humbly present my PyOpenGL
basecode<http://geometrian.com/programming/tutorials/OpenGL%20Program%20Shell.py.txt>as
a well-tested, simple starting point for learning PyOpenGL.

Good luck,
Ian

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users