On Tue, Oct 21, 2008 at 10:15 PM, Ian Mallett <[EMAIL PROTECTED]> wrote:

> Hi,
>
> On Tue, Oct 21, 2008 at 12:28 PM, claudio canepa <[EMAIL PROTECTED]>wrote:
>
>> Searching the pygame site with 'shaders + opengl' got many hits. Can you
>> point to the specif script(s) in trouble ?
>>
> I was referring to these tutorials:
> http://www.pygame.org/wiki/GLSLExample?parent=CookBook
> http://www.pygame.org/wiki/GLSL_ARB_Example?parent=GLSLExample
> Which when modified give me this error:
> ValueError: glShaderSource requires 2 arguments (shaderObj, string),
> received 4: (2L, 1, <cparam 'P' (046cc5f8)>, <cparam 'P' (046cc4b8)>)
>
I got away with this, only to get a:
(1) : error C0000: syntax error, unexpected '(' at token "("
(1) : error C0501: type name expected at token "("
ValueError: Shader compilation failed
Esentially, instehad to try to bind directly with ctypes I used the ~new
modules OpenGL.GL.ARB.shader_objects  and OpenGL.GL.ARB.vertex_shader.
If you want to look at the code (the cookbook modified one), I pasted at
http://python.pastebin.com/m209c67af
The problem is that I dont know enough about pyOpenGL, probably the
preparation phase before calls to compile must be done.
Using grep / find in files for 'shader' over pyglet 1.1.1 I see some
promising calls, like:
glShaderSourceARB
glCompileShaderARB
...
Maybe you can look how pyglet calls the shader related code ? Its a pure
python library, as you probably knows.
--
claxo

Reply via email to