Re: [osg-users] Texture coordinates question
Hi John, You'll need to duplicate your vertices to be able to have different tex coordinates as osg::Geometry only support per vertex bindings for tex coordinates. For performance it's a false economy to vertex indices or per primitive bindings as they drop the OSG down on to OpenGL slow paths. Use overall, per primitive set or per vertex bindings for best performance. The only slow paths should also be considered deprecated as neither OpenGL ES no OpenGL 3.x support this only slow paths. Robert. On Thu, Nov 20, 2008 at 8:22 PM, Argentieri, John-P63223 <[EMAIL PROTECTED]> wrote: > Gentlemen, > > Is there a way to force vertex B to have a different texture coordinate in > each of triangle ABC and triangle BCD? > > Texture coordinate indices? I don't understand how those are applied. If the > binding is per_primitive, will each of my triangles be textured by a single > pixel? > > > John Argentieri > Software Engineer > GENERAL DYNAMICS > C4 Systems > [EMAIL PROTECTED] > > "This email message is for the sole use of the intended recipient(s) and may > contain GDC4S confidential or privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not an > intended recipient, please contact the sender by reply email and destroy all > copies of the original message." > > > ___ > 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] Texture coordinates question
Argentieri, John-P63223 wrote: Gentlemen, Is there a way to force vertex B to have a different texture coordinate in each of triangle ABC and triangle BCD? Texture coordinate indices? I don't understand how those are applied. If the binding is per_primitive, will each of my triangles be textured by a single pixel? PER_PRIMITIVE texture coordinates aren't allowed (only PER_VERTEX, or none at all). Also, you don't want to use texture coordinate indices because they'll knock you into immediate mode (slow) rendering. The easy way to get what you're looking for is to have arrays like this: vertex array: vA, vB, vC, vB, vC, vD texcoord array: tA, tB1, tC, tB2, tC, tD where tB1 != tB2 and use a DrawArrays primitive set (ie: don't use DrawElements). In other words, just duplicate the vertex positions explicitly in your vertex array, and make the corresponding texture coordinates whatever you need them to be. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture coordinates question
Gentlemen, Is there a way to force vertex B to have a different texture coordinate in each of triangle ABC and triangle BCD? Texture coordinate indices? I don't understand how those are applied. If the binding is per_primitive, will each of my triangles be textured by a single pixel? John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems [EMAIL PROTECTED] "This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message." ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org