[osg-users] Lot of questions about OSG (Shaders)
Andrey Perper
osgforum at tevs.eu
Tue Sep 1 05:46:07 PDT 2015
Thanks Sebastian !
Looks like i found solution:
Code:
bool ProgramIsCompiled(COITPCore *pCre,osg::Program *pPrg)
{
Camera *pCam = pCre->getCamera();
int contextID = pCam->getGraphicsContext()->getState()->getContextID();
for(int i = 0; i < pPrg->getNumShaders(); i++)
{
if(!pPrg->getShader(i)->getPCS(contextID)->isCompiled())
return 0;
}
return 1;
}
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64980#64980
More information about the osg-users
mailing list