On Sun, Feb 24, 2008 at 5:26 PM, Drew Smathers <[EMAIL PROTECTED]> wrote:
> def _shaderSource(text, shader_type=GL_VERTEX_SHADER):
> buff = c.create_string_buffer(text)
> c_text = c.cast(c.pointer(c.pointer(buff)), c.POINTER(c.POINTER(GLchar)))
> shader = glCreateShader(shader_type)
> glShaderSource(shader, 1, c_text, None)
> return shader
>
>
Also, Just to clarify, the variable c in the above example is the
module ctypes. So this comes from:
import ctypes as c
--
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
d.p.s
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---