[osg-users] indices
Hi, Sorry for this question, but i want to know exaclty what is an indice and what is used for. the way that i understood is basicly an ID number to the vertexes? i am a completly noob in 3D graphics programming and some terms i quite dont understand yet. Thank you! Cheers, Renato -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45936#45936 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] indices
Hello Renato, Basically an index inside an index buffer is used to sort of reuse vertices to draw something. So imagine a cube, it basically hase 8 corners but six sides made up of two triangles each. If you don't want to duplicate those corner points, you can define the 8 corners and later on just index them. So for instance if you have 4 vertices like (0,0) (1,0) (1,1) (0,1) you can define two triangles by using the indices 0,1,2,2,0,3. This will save you sending the vertices more than once along the pipeline. In general you have to be careful because index buffers have a dark side, at least on the OpenGL end. They can't be used for real life geometries that have normals and other attributes, as the normals of a box's corners just don't have the same normal for each face. Hope that helps you, anyways, there are plenty of examples out there in the web, so check them out :-) cheers Sebastian Hi, Sorry for this question, but i want to know exaclty what is an indice and what is used for. the way that i understood is basicly an ID number to the vertexes? i am a completly noob in 3D graphics programming and some terms i quite dont understand yet. Thank you! Cheers, Renato -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45936#45936 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] indices
Hi Renato, I haven't read your other postings, but to answer this and in anticipation of what your next questions may be, I'd like to point you to a site that will help with a lot of what goes on under the hood. First to answer your question go and read this little primer on modern opengl vertex arrays: http://www.songho.ca/opengl/gl_vertexarray.html It will explain what is going on under the hood of OpenSceneGraph. What OSG does is get rid of you having to maintain all of the opengl state and focus on the data. Your question about the index array is directly answered there. Dig around the top pages and you will most likely find the answers to your future questions: http://www.songho.ca/opengl/ OSG uses transpose matrices. You don't have to understand that to use OSG, but if you know linear algebra and are planning on manipulating matrices by hand you need to know that. Good luck! -K On Thu, 1 Mar 2012, Renato Oliveira wrote: Hi, Sorry for this question, but i want to know exaclty what is an indice and what is used for. the way that i understood is basicly an ID number to the vertexes? i am a completly noob in 3D graphics programming and some terms i quite dont understand yet. Thank you! Cheers, Renato -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45936#45936 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Keith ParkinsU of R Center for Visual Science Meliora Hall, Room 253 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] indices
Hi, Wow, thanks guys for the quick and helpfull response. these information will definitely help. I am kind of lost with 3D but i will get there. Thanks again. Cheers, Renato -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45942#45942 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org