Did you find a fix for this? I got the same problem on my computer. I startet
to write some shaders myself and i get the access violation error too.
The osgforest example is working fine. I modified the shaders in there and it
also worked fine.
Then i started to modify the osgviewer application to test it with my own
simple primitives.
Code:
osg::StateSet* nodess = pyramidGeode->getOrCreateStateSet();
osg::Program* program = new osg::Program();
nodess->setAttributeAndModes(program,osg::StateAttribute::ON);
osg::Shader* fragShader = new osg::Shader(osg::Shader::FRAGMENT);
program->addShader(fragShader);
fragShader->loadShaderSourceFromFile("C://OpenSceneGraph//OpenSceneGraph//build//bin//simple.frag");
The simple.frag is:
Code:
void main(void)
{
gl_FragColor = vec(1.0, 1.0, 0.0, 1.0);
}
It all runs fine until the viewer.frame() is called for the fist time. The
Visual Studio gives me the Access Violation error message 0xC0000005.
If i comment out
//nodess->setAttributeAndModes(program,osg::StateAttribute::ON);
the pyradmid is drawn fine without problems.
I also tried to use ref_ptr for all objects, but the it did not change anything.
What could be the source of the access violation?
My System:
OSG 2.8.2
Windows 7 64 bit all updates
Intel Q45 graphics, latest drivers
Visual Studio 2008
[/b][/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26785#26785
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org