I'm having problems getting my shaders to work properly. I had this
working with OSG 1.2 on Windows.
I'm setting them to a state set on a osg::Camera that is entered onto
the scenegraph on the root node:
osg::ref_ptr<osg::StateSet> ss =
_camera->getOrCreateStateSet();
osg::ref_ptr<osg::Program> program = new
osg::Program;
program->setName( "shader");
program->addShader( new osg::Shader(
osg::Shader::VERTEX, vertexShaderSrc ) );
program->addShader( new osg::Shader(
osg::Shader::FRAGMENT, fragShaderSrc ) );
ss->setAttributeAndModes( program.get(),
osg::StateAttribute::ON || osg::StateAttribute::PROTECTED);
ss->setAttributeAndModes( mode.get(),
osg::StateAttribute::ON || osg::StateAttribute::PROTECTED);
I don't get any errors ... the shader simply doesn't load. I've added
syntax errors into the shader code and I don't get any errors reported.
I do, however, get this output when I set the debug level to INFO:
OpenGL extension 'GL_ARB_vertex_program' is not supported.
OpenGL extension 'GL_ARB_framebuffer_object' is not supported.
OpenGL extension 'GL_ARB_fragment_program' is not supported.
The osgShaders example does not work either and I get repeated errors
like:
Error: glGetShaderiv not supported by OpenGL driver
Error: glCreateProgram not supported by OpenGL driver
Error: glAttachShader not supported by OpenGL driver
Error: glAttachShader not supported by OpenGL driver
Error: glLinkProgram not supported by OpenGL driver
Error: glGetProgramiv not supported by OpenGL driver
glLinkProgram "blocky" FAILED
Something else (probably related) is when I use a FRAME_BUFFER_OBJECT as
the target Implementation for the camera I get an error message:
Error: Unable to create Window.
This also happens in osgShadow
Does this look like a driver problem?
Steven Powers
General Dynamics Robotic Systems
Software Engineer
1234 Tech Court
Westminster, MD 21157-3029
(410) 876-9200 Fax: 410-876-9470
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org