Hello..

1)
I just plan to perform something like that:


Code:
osg::ref_ptr<osg::Shader> EarthLoQVert = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
"media/programs/EarthLoQ.vert");

if(EarthLoQVert.isCompiledOK)
{
      create1..........
}
else
{
      osg::ref_ptr<osg::Shader> EarthLoQVertexLighting =       
osgDB::readShaderFile(g_SceneGlobals.systemPath + "media/programs 
/EarthLoQVL.vert");

     if(EarthLoQVertexLighting.isCompiledOK)
    {
        create2
     }
     else
    {
        fatalError
     }
}



i need to know if my shader is compiled ok after loading!
then i can create scene states, otherwise i load other shader and create other 
scene states

thanks


2) Are shaders with same names loaded single time ?


Code:
osg::ref_ptr<osg::Shader> EarthLoQVert = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
"media/programs/EarthLoQ.vert");

osg::ref_ptr<osg::Shader> EarthLoQVert1 = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
"media/programs/EarthLoQ.vert");

osg::ref_ptr<osg::Shader> EarthLoQVert2 = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
"media/programs/EarthLoQ.vert");



or should i check it self ?

3) Same question like "2" is for:

osg::ref_ptr<osg::Image> nrmlImage = 
osgDB::readImageFile(g_SceneGlobals.systemPath + 
"media/textures/earth/normalmap.bmp");

If there will be new questions - i will post that here...
thanks!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62958#62958





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to