HI Sergey, osg::State has support for aliasing the gl_Vertex, gl_Color etc. attributes to osg_Vertex, osg_Color etc just in the same way as gl_ModelViewMatrix is mapped to osg_ModelViewMatrix etc. You just need to enable it via osg::State::setUseVertexAttributeAliasing(true); i.e.
graphicscontext->getState()->osg::State::setUseVertexAttributeAliasing(true); Robert. On 8 September 2014 14:49, Sergey Kurdakov <[email protected]> wrote: > Hi All, > > there is a nice answer on how to use textures in shader > here http://forum.openscenegraph.org/viewtopic.php?t=8273 ( see answer by > Skylark > (Jean-Sébastien Guay) ) > > now in OpenGL ES 2.0 there is no such feature as possibility to address > > gl_TexCoord[0].st > > there is a need to pass it in a separate step so in shader it is possible > to access texture coordinate - say by such declaration: > > attribute vec2 a_TexCoordinate; > > thus setting setTexCoordArray won't automatically pass any data, and > overall lack of texture coordinates seem to brake the overall osg way to > pass everything to program. > > so the question is how to appoach the issue to pass texture coordinates to > OpenGL ES 2.0 in unified way? > > Just a thought then: > OpenSceneGraph has a nice feature like osg_ModelViewMatrix, ideally for > platforms which lack gl_TexCoord support there could be similar build in > attributes/uniforms, but I cannot find them. > > so if there is not unified way already ( maybe there is , just I'm not > aware ) any pointers ( or what should be changed to add a glue to bring > setTexCoordArray to shader attributs/uniforms ) are welcome. > > Regards > Sergey > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

