Login  Register

JOGL win32 binding bug for glTransformFeedbackVaryings

Posted by Matt on Aug 17, 2010; 11:16pm
URL: https://forum.jogamp.org/JOGL-win32-binding-bug-for-glTransformFeedbackVaryings-tp1197405.html

Hi,

I am developing an application in which I use method:
void glTransformFeedbackVaryings(int program, int count, String[] locations, int bufferMode);

I am pretty sure there must be a bug in win32 implementation of passing the String[] locations argument to OpenGL.
On my machine everything works just fine under Linux (same JOGL code) but also everything is OK under Windows in a similar project implemented in 100% in C++.

However when this method is used from JOGL under Win32:

...
int shaderProgram = gl.glCreateProgram();
int v = getShaderCode(gl, "sample.vs", GL3.GL_VERTEX_SHADER);
gl.glAttachShader(shaderProgram, v);

String[] vars = new String[] { "Position" };
               
gl.glTransformFeedbackVaryings(shaderProgram, 1, vars, GL3.GL_SEPARATE_ATTRIBS);

gl.glLinkProgram(shaderProgram);
...

The linking of program fails with some random chars in place of given variable name:

---------
error: Varying (named ¤) specified but not present in the program object.

So it looks like OpenGL is receiving incorrect variable name, pointer gets dereferenced incorrectly, etc. Under Linux the linking passes, and if I change the variable name to some incorrect value, I get e.g. "Position" in place where on Windows is this random "¤" char.


I would appreciate any help/fix, as this is crucial to me!

Thanks,
Matt.