Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Grigoriy Mylnikov
Thank you, it works. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75222#75222 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Chris Hanson
http://alphapixel.com/faqs/ src\osgUtil\SceneView.cpp(422): osg::Uniform* uniform = _localStateSet->getOrCreateUniform(“osg_ViewMatrix”,osg::Uniform::FLOAT_MAT4); src\osgUtil\SceneView.cpp(428): osg::Uniform* uniform =

Re: [osg-users] Change color of node read from dxf file

2018-11-20 Thread Chris Hanson
I dunno man, your code is making my head explode. I don't think Geode HAS an addChild method, so I don't even know why what you're doing would compile. I don't think I can help any further. I'm missing something or you are. On Tue, Nov 20, 2018 at 5:46 PM Diego Mancilla wrote: > Hi, > > The

Re: [osg-users] Change color of node read from dxf file

2018-11-20 Thread Diego Mancilla
Hi, The suggestion of Chris solve the problem. The actual code: Code: osg::Node* lines = osgDB::readNodeFile("lines.dxf"); osg::Geode* geode = new osg::Geode; ColorVisitor newColor; newColor.setColor( 1.0f, 0.0f, 0.0f ); topography->accept(newColor); geode->addChild(lines);

Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2018-11-20 Thread Grigoriy Mylnikov
Hi, One more question. If I use gl_ModelViewMatrix in shaders to transform Light position, it gets transformed by both camera matrix and current node's matrix, that is not right. Is there some build-in OSG uniform that holds only camera matrix or only model matrix? Or I should compute it and

Re: [osg-users] Change color of node read from dxf file

2018-11-20 Thread Diego Mancilla
Hello Chris, Thank you for your answer. My code, actually compiles, nevertheless I was expecting a conceptual error from my side. I will try what you suggest. Cheers, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75217#75217