More advanced examples under http://pyglet.googlecode.com/svn/trunk/examples/
would be great!
(Shader, VBO, ...)
You need to convert the string to the protype C type, like:
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
--
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
d.p.s
Oops :-),
s/protype/proper type
Also, Just to clarify, the variable c in the above example is the
module ctypes. So this comes from:
import ctypes as c