Hi Gordon,

2 things

1:  osg::Sphere is does not have texture coords so you would not see a
texture anyway
( search the archives on Shapes and what they were designed for )

Sorry to enter a thread for this, but yes, osg::ShapeDrawables have texcoords. See src/osg/ShapeDrawable.cpp, DrawShapeVisitor::drawHalfSphere() for the case of an osg::Sphere :

    glNormal3f(-c*nRatioBase,-s*nRatioBase,-nzBase);

    glTexCoord2f(texCoord,vBase);
    glVertex3f(c*rBase,s*rBase,zBase+zOffset);

etc.

It's if you want to *change* the texcoords, or anything else, or do more sophisticated things like multitexturing that you'll have trouble with ShapeDrawables. I can't argue with the comment that ShapeDrawables are not that useful for general use, but for simple things, they're pretty complete (including texcoords).

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to