Hello Johannes, On 03/14/2012 06:40 AM, Johannes Brunen wrote:
Attached you can find two log files.1. OpenSG_ok.log: No problem, shader compilation succeeded 2. OpenSG_failed.log: Shader compilation failed I have tried to provide additional log information in the files. Could you take a look if you can find something problematic? Maybe something with the shader code itself is not correct. They are also embedded in the log files.
looking at the two log files in kdiff3 they are very similar (except addresses of objects, etc.) and the failure of the shader compilation seems entirely spurious. The attached patch adds additional calls to glGetError around the shader compilation, maybe there are pending OpenGL errors and that somehow confuses the shader compile status check?
Cheers, Carsten
diff --git a/Source/System/State/Shader/Base/OSGShaderProgram.cpp b/Source/System/State/Shader/Base/OSGShaderProgram.cpp index 3990221..5f5f8b4 100644 --- a/Source/System/State/Shader/Base/OSGShaderProgram.cpp +++ b/Source/System/State/Shader/Base/OSGShaderProgram.cpp @@ -46,6 +46,7 @@ #include "OSGConfig.h" #include "OSGShaderProgram.h" +#include "OSGGLU.h" #include "OSGGLFuncProtos.h" #include <boost/bind.hpp> @@ -644,14 +645,20 @@ UInt32 ShaderProgram::handleGL(DrawEnv *pEnv, static_cast<const char **>(&source), 0); + glErr("ShaderProgram - pre compile"); + osgGlCompileShader(uiShader); + glErr("ShaderProgram - post compile"); + GLint iStatus = 0; osgGlGetShaderiv( uiShader, GL_COMPILE_STATUS, &iStatus); + glErr("ShaderProgram - post status check"); + if(iStatus == 0) { Char8 *szDebug;
------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users