Bugs item #2935298, was opened at 2010-01-19 18:04
Message generated for change (Comment added) made by mcfletch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2935298&group_id=5988
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GL
Group: v2.0
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: glShaderSource wrapper fail on ATI card ?
Initial Comment:
Hi everyone,
I got a problem on my framework with Shader + ATI card. By switching from pyglet to pyopengl, shader just not working anymore. After investigation, it seem that the wrapper on glShaderSource is not working properly.
If i use the pyopengl wrapper (glShaderSource(shader, source)), i got an error at glLinkProgram() :
Fragment shader was successfully compiled to run on hardware.
Fragment shader(s) failed to link, vertex shader(s) failed to link.
ERROR: 1:1: error(#132) Syntax error: 'v' parse error
ERROR: error(#273) 1 compilation errors. No code generated
ERROR: 1:1: error(#132) Syntax error: 'v' parse error
ERROR: error(#273) 1 compilation errors. No code generated
If i'm doing ctype myself like:
glShaderSource = platform.createBaseFunction(
'glShaderSource', dll=platform.GL,
resultType=None,
argTypes=(constants.GLhandle, constants.GLsizei, ctypes.POINTER(ctypes.c_char_p), arrays.GLintArray,),
doc = 'glShaderSource( GLhandle(shaderObj), str( string) ) -> None',
argNames = ('shaderObj', 'count', 'string', 'length',),
)
from ctypes import *
source = c_char_p(source)
length = c_int(-1)
glShaderSource(shader, 1, byref(source), byref(length))
-> no more error message at glLinkProgram.
Where i can debug more the wrapper function ? Is it a converter problem ?
Thanks,
Mathieu
Note: i'm running the 3.0.0-0ubuntu1 from Ubuntu Karmic.
----------------------------------------------------------------------
>Comment By: Mike C. Fletcher (mcfletch)
Date: 2010-02-22 15:45
Message:
This is almost certainly the case where you are specifying the source as a
single string. The function actually takes a list-of-strings. Some
implementations work perfectly well with the
sequence-of-one-character-strings (concatenating them before compiling),
others run the syntax check/compile before concatenation.
I've just added code to convert to a list before doing the conversion if
you pass in a string. Hopefully this will avoid these problems in the
future.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2935298&group_id=5988
|