Re: [PyOpenGL-Users] Difficulty accessing glCreateShader
Brought to you by:
mcfletch
|
From: Mohan <mg...@ca...> - 2009-03-17 18:18:11
|
Hi Mike,
Thank you very much for the (very quick!) reply. Changing the code to refer
to
glCreateShader = OpenGL.GL.glCreateShader
etc. solved that problem. Unfortunately, there is still an error, namely
ValueError: glShaderSource requires 2 arguments (shaderObj, string),
received 4:
(2L, 1, <cparam 'P' (0187bd28)>, <cparam 'P' (0187bd78)>)
(I have kept the
glShaderSource.argtypes = [c_int, c_int, POINTER(c_char_p),
POINTER(c_int)]
in the source.)
In another post on a very similar problem (pyopengl-Bugs-1878648), you wrote
>I'm guessing what's
happening is that you are on Win32, and that at the point where you import
the module, there's no glShaderSource function. As a result the wrappers
were not being created. Later, when you tried to call them, the
null-function wrapper was able to resolve the function and tried to call it
directly.<
Is there a workaround for this? I had a look at the example you mentioned
in that post, and it references glShaderSourceARB rather than
glShaderSource. I can switch to ARB extensions if need be, but I'd like to
understand why the straightforward 2.0 approach isn't working, i.e. why
there's no glShaderSource function when the module is imported.
It sounds like I might be asking for help in an inappropriate place, in
that I'm not really using the functionality of PyOpenGL. (I am very
grateful for the previous assistance!) Would you happen to know of a more
appropriate mailing list or forum?
Thanks again,
Mohan
PS. My mail client is misbehaving -- I've waited half an hour to avoid
double posts, but in case something went wrong I'm very sorry!
|