Hi,

> is it possible for OSG to render a geometry with shaders (e.g.: cow) and
another geometry without any shader (e.g.:walls) in the same scene

yes. You set your osg::Program with the shaders only for that part of the
scene you want to have it in effect, via StateSet, like
sceneWIthShaders->getOrCreateStateSet()->setAttribute( myProgram )

Nick




On Tue, Aug 26, 2014 at 12:44 PM, Daniel Lobo <wolfyl...@gmail.com> wrote:

> The color of the walls could be texture coordinates as you says, it sounds
> convincing. But, anyway, I tried adding some normals for testing with
> following code but it is still not working:
>
>
> Code:
>
> osg::Vec3Array *normalArray = new osg::Vec3Array();
> normalArray->push_back(osg::Vec3(0.0f,0.0f, 1.0f));
> triGeometry1->setNormalArray(normalArray);
> triGeometry1->setNormalBinding(osg::Geometry::BIND_OVERALL);
>
> ....
>
> osg::Vec3Array *normalArray = new osg::Vec3Array();
> normalArray->push_back(osg::Vec3(0.0f,0.0f, 1.0f));
> triGeometry2->setNormalArray(normalArray);
> triGeometry2->setNormalBinding(osg::Geometry::BIND_OVERALL);
>
>
>
>
>
> In other hand, I am wondering if I am wrong in the rendering model that I
> am trying: is it possible for OSG to render a geometry with shaders (e.g.:
> cow) and another geometry without any shader (e.g.:walls) in the same scene?
>
> Or, otherwise I have to render everything with shaders?
>
> Best wishes
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60784#60784
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to