Re: JOGL win32 binding bug for glTransformFeedbackVaryings
Posted by
Michael Bien on
Aug 18, 2010; 3:42am
URL: https://forum.jogamp.org/JOGL-win32-binding-bug-for-glTransformFeedbackVaryings-tp1197405p1199427.html
Hello Matt,
a big help would be if you could provide a junit test for this bug.
tests are located here:
http://github.com/mbien/jogl/blob/master/src/junit/com/jogamp/test/junit
http://jogamp.org/wiki/index.php/How_to_Contribute
or
bugreport + attachment
thanks for tracking this down,
best regards,
michael
On 08/18/2010 01:16 AM, Matt [via jogamp] wrote:
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.
--
http://michael-bien.com/