From Sebastian Messerschmidt, "I've taken some time and refactored some places where the old set*Binding were used."
This commit is contained in:
@@ -1073,14 +1073,13 @@ Geometry* osg::createTexturedQuadGeometry(const Vec3& corner,const Vec3& widthVe
|
||||
|
||||
osg::Vec4Array* colours = new osg::Vec4Array(1);
|
||||
(*colours)[0].set(1.0f,1.0f,1.0,1.0f);
|
||||
geom->setColorArray(colours);
|
||||
geom->setColorBinding(Geometry::BIND_OVERALL);
|
||||
geom->setColorArray(colours, osg::Array::BIND_OVERALL);
|
||||
|
||||
osg::Vec3Array* normals = new osg::Vec3Array(1);
|
||||
(*normals)[0] = widthVec^heightVec;
|
||||
(*normals)[0].normalize();
|
||||
geom->setNormalArray(normals);
|
||||
geom->setNormalBinding(Geometry::BIND_OVERALL);
|
||||
geom->setNormalArray(normals, osg::Array::BIND_OVERALL);
|
||||
|
||||
|
||||
#if defined(OSG_GLES1_AVAILABLE) || !defined(OSG_GLES2_AVAILABLE)
|
||||
DrawElementsUByte* elems = new DrawElementsUByte(PrimitiveSet::TRIANGLES);
|
||||
|
||||
@@ -1805,8 +1805,7 @@ Geode* osg::createGeodeForImage(osg::Image* image,float s,float t)
|
||||
|
||||
osg::Vec4Array* colours = new osg::Vec4Array(1);
|
||||
(*colours)[0].set(1.0f,1.0f,1.0,1.0f);
|
||||
geom->setColorArray(colours);
|
||||
geom->setColorBinding(Geometry::BIND_OVERALL);
|
||||
geom->setColorArray(colours, osg::Array::BIND_OVERALL);
|
||||
|
||||
geom->addPrimitiveSet(new DrawArrays(PrimitiveSet::QUADS,0,4));
|
||||
|
||||
|
||||
@@ -715,8 +715,7 @@ void OcclusionQueryNode::createSupportNodes()
|
||||
|
||||
ref_ptr<Vec4Array> ca = new Vec4Array;
|
||||
ca->push_back( Vec4( 1.f, 1.f, 1.f, 1.f ) );
|
||||
geom->setColorArray( ca.get() );
|
||||
geom->setColorBinding( Geometry::BIND_OVERALL );
|
||||
geom->setColorArray( ca.get(), Array::BIND_OVERALL );
|
||||
|
||||
geom->addPrimitiveSet( new DrawElementsUShort( PrimitiveSet::QUADS, 24, indices ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user