I've noticed that some OpenGL functions exposed by Pyglet require
declaration of ctypes variables and/or casting.

i.e.

print "OpenGL Version:", cast(glGetString(GL_VERSION), c_char_p).value

_or_

status = ctypes.c_int();
glGetShaderiv( shader, GL_COMPILE_STATUS, status )
print "Shader Compile Status:", status.value

I'm new to ctypes, but I imagine that these functions are simply part
of the ctypes interface exposed by Pyglet.  Is it possible or
desirable to have simple wrapper methods?

i.e.

print "OpenGL Version:", glGetString(GL_VERSION)

_or_

print "Shader Compile Status:", glGetShaderiv( shader,
GL_COMPILE_STATUS )

I imagine these wrapper methods would be quite a bit slower, but is
that really significant?  I imagine my final production code would
have these low-level calls to OGL moved to an extension library or
removed entirely.  Having simple method wrappers would really help
until I reach that point.

Thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to