[osg-users] Geometry shader based apps/examples have shader compile failures...
Mark Pai
mpai at hotmail.com
Thu Jul 23 22:43:54 PDT 2015
Hello,
I am using OSG ver 3.4.0-Rc1 under Window 8.1, Visual Studio 2012 Win64. NVidia laptop driver Ver: 353.30.
Of-late, I started noticing strange geometry shader compile failures with applications that worked perfectly (in 3.2) after I switched to osg 3.4.0-rc1.
First-of, my own application that has one geometry shader (#version 400) that is ending up with compile errors, and then I see corrupt source string in 'src' when I did std::string src = geomObject->getShaderSource();
Variables uv, normal are correctly declared but the error log says -
GEOMETRY glCompileShader "" FAILED
GEOMETRY Shader "" infolog:
ERROR: 0:64: 'uv' : undeclared identifier
ERROR: 0:64: 'assign' : cannot convert from '2-component vector of float' to 'float'
ERROR: 0:72: 'normal' : undeclared identifier
ERROR: 0:72: 'assign' : cannot convert from '3-component vector of float' to 'float'
iow, original shader code says:
out vec2 uv;
out vec3 normal;
and geomObject->getShaderSource() says:
out vec2 uv;mal;
The shader source is in a text file and is read using
osg::ref_ptr<osg::Shader> geomObject = osg::Shader::readShaderFile(osg::Shader::GEOMETRY, gsFilename.txt);
Then, I also see similar geometry shader compile failures with examples such as osgForest, osgSSBO, osgTessellationShader...
I am not sure what is going on. Any help here is sincerely appreciated.
Thanks, Regards,
-Mark
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64459#64459
More information about the osg-users
mailing list