Hi, have a look at the osggeometry example
Nick On Fri, Dec 12, 2014 at 3:42 PM, Marcin Kolny <marcin.ko...@gmail.com> wrote: > > Hi, > I've got following code: > > > Code: > > glMatrixMode (GL_PROJECTION); > glLoadIdentity (); > > GLfloat verts[] = { -1.0f, -1.0f, 1.0f, -1.0f, > 1.0f, 1.0f, -1.0f, 1.0f }; > GLfloat texcoords[] = { 0.0f, 0.0f, 1.0f, 0.0f, > 1.0f, 1.0f, 0.0f, 1.0f }; > > glEnable (GL_TEXTURE_2D); > glBindTexture (GL_TEXTURE_2D, texture); > glClientActiveTexture (GL_TEXTURE0); > > glEnableClientState(GL_VERTEX_ARRAY); > glEnableClientState (GL_TEXTURE_COORD_ARRAY); > > glVertexPointer (2, GL_FLOAT, 0, &verts); > glTexCoordPointer (2, GL_FLOAT, 0, &texcoords); > glDrawArrays (GL_TRIANGLE_FAN, 0, 4); > > glDisableClientState(GL_TEXTURE_COORD_ARRAY); > > glDisable(GL_TEXTURE_2D); > > glEnableClientState(GL_COLOR_ARRAY); > > float line_vertex [] = { > -1,-1, > 1,1, > }; > float line_color[] = { > 1,0,0, > 1,0,0, > }; > > glVertexPointer(2, GL_FLOAT, 0, line_vertex); > glColorPointer(3, GL_FLOAT, 0, line_color); > glDrawArrays(GL_LINES, 0, 2); > //draw_user_function(); > > glDisableClientState(GL_VERTEX_ARRAY); > glDisableClientState(GL_COLOR_ARRAY); > > > > > And I'd like to use OSG instead. But unfortunately, I've no idea, how to > do it. Could somebody give me an advice? Thanks in advance > > Thank you! > > Cheers, > M.K. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=62043#62043 > > > > > > _______________________________________________ > 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