Hi, I have got problems with shader, my code to create working shader :
{ (declarations) (...) vertexShader = new osg::Shader(osg::Shader::VERTEX); fragmentShader = new osg::Shader(osg::Shader::FRAGMENT); vertexShader->loadShaderSourceFromFile("sphere.vert"); fragmentShader->loadShaderSourceFromFile("sphere.frag"); shaderProgram->addShader(vertexShader); shaderProgram->addShader(fragmentShader); stateSet->setAttributeAndModes(shaderProgram,osg::StateAttribute::ON); (...) } When i write a simple program which only one or two objects and attach the program into StateSet of those objects it works fine. Problem starts when I wanted to include this code in bigger project, application crashes and VS debug doesn't show me where is the bad code, I only get : "0xC0000005: *Access violation* reading location *0xcdcdcdcd *" Where can be the problem ? Best regards, Andrew.
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org