Re: [osg-users] viewport is changing after huge sized object ; updating only visible nodes

2016-03-30 Thread Andrey Perper
>I guess he wants to have the updateCallback called for "culled" geodes, or 
>some way to check if the node was culled. 

Yes!! that is correct!


> I know too little about the specifics of your application. 
The Application has earth + missile tracks on earth.
I just add these tracks to scene and my viewer must stay at point before 
adding. Camera rotating is performed around earth center

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] viewport is changing after huge sized object ; updating only visible nodes

2016-03-28 Thread Andrey Perper
Hey guys!!!


1) My scene is set like it is always fits in camera (i guess it is 
osg-default). If i add huge sized object - i see all scene (camera flies away), 
but my viewpoint must stay old.

How to fix that ?

2) I have dozen of nodes that are updating in my addUpdateCallback functor 
anyway (whether node is visible or not), but i would want to do that only if 
node is visible. Node has osg::Geode drawables.

How to fix that ?

Thanks!

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lot of questions about OSG (Shaders)

2015-09-01 Thread Andrey Perper
i do not understand! What do i have  to do?
Code plz

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lot of questions about OSG (Shaders)

2015-09-01 Thread Andrey Perper
2 robertosfield

I still wait , that 100 000 users of OSG will help me!

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lot of questions about OSG (Shaders)

2015-09-01 Thread Andrey Perper
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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lot of questions about OSG (Shaders)

2015-03-31 Thread Andrey Perper
Hey Robert!

before you do any work. 

Could you post me code snippet, which have to do this checking ?

based on:

osg::ref_ptrosg::Shader SkyFromSpaceVert = osgDB::readShaderFile(systemPath + 
media/programs/EarthSkyFromSpaceShader.vert);

i guess my application gonna be multithreaded..

thanks...

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Lot of questions about OSG (Shaders)

2015-03-17 Thread Andrey Perper
Hello..

1)
I just plan to perform something like that:


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

if(EarthLoQVert.isCompiledOK)
{
  create1..
}
else
{
  osg::ref_ptrosg::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_ptrosg::Shader EarthLoQVert = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
media/programs/EarthLoQ.vert);

osg::ref_ptrosg::Shader EarthLoQVert1 = 
osgDB::readShaderFile(g_SceneGlobals.systemPath + 
media/programs/EarthLoQ.vert);

osg::ref_ptrosg::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_ptrosg::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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org