Problem using Transform Feedback

Hello,

I am trying to get a simple Testprogram using Transform Feedback working, but failed to even use the first command correctly.
I use the current nightly build (29-Sep-2009) of Jogl 2.
Here is what I did:

  1. Initialize a GL3 Object “gl”

  2. Create a Program “id”

  3. Create a Vertex Shader and attach it to “id”

  4. Use the following Command:

 gl.glTransformFeedbackVaryings(id, 1, new String[] {"position"}, GL3.GL_SEPARATE_ATTRIBS); 
 where "position" refers to the varying declared as 
out vec4 position;
in the Vertex Shader. 
  1. Link id

Using glGetProgramInfoLog afterwards, I receive an error message like the following:
“error: Varying (named pÿ³tion) specified but not present in the program object.”

Please note that this message is not exactly the same every time I start the application:
“error: Varying (named °àåtion) specified but not present in the program object.”
“error: Varying (named €ètion) specified but not present in the program object.”

Did I make a mistake or has JOGL / glTransformFeedbackVaryings problems with a String Array as an argument?

Any help or suggestion would be great.

You should make sure that you’re actually writing to the position variable, otherwise shader compilers are likely to optimize it away, in which case it’s not present anymore (kind-of annoying).

Thanks for the quick response. But that is not the problem here. My (simplistic) Vertex Shader is:


#version 150

uniform mat4 modelViewProjetionMatrix;

in vec3 vPosition;
out vec4 position;

void main() {
	position = modelViewProjetionMatrix * vec4(vPosition, 1.0);
	gl_Position = position;	
} 

My suggestion is, that the String Array containing “position” is not transferred correctly to OpenGL.
An indication for this is the wrong spelling of “position” in the error message, e.g.: °àå tion, pÿ³ tion, €è tion, …
(see my posting above)