Name change and const change of Drawable::drawImmediateMode(State&) to

Drawable::drawImplementation(State&) const.   Various updates to the
rest of the OSG to accomodate this.
This commit is contained in:
Robert Osfield
2002-11-06 15:43:11 +00:00
parent e34ecafb1e
commit 3bd400130c
26 changed files with 112 additions and 74 deletions

View File

@@ -77,7 +77,7 @@ bool DrawPixels::computeBound() const
return true;
}
void DrawPixels::drawImmediateMode(State&)
void DrawPixels::drawImplementation(State&) const
{
glRasterPos3f(_position.x(),_position.y(),_position.z());

View File

@@ -112,9 +112,9 @@ void Drawable::compile(State& state)
glNewList( globj, GL_COMPILE );
if (_drawCallback.valid())
_drawCallback->drawImmediateMode(state,this);
_drawCallback->drawImplementation(state,this);
else
drawImmediateMode(state);
drawImplementation(state);
glEndList();

View File

@@ -247,7 +247,7 @@ void GeoSet::setTextureBinding( BindingType binding )
set_fast_path();
}
void GeoSet::drawImmediateMode(State& state)
void GeoSet::drawImplementation(State& state) const
{
if( _coords == (Vec3 *)0 && _iaformat == IA_OFF ) return;

View File

@@ -81,7 +81,7 @@ void GeoSet::set_fast_path( void )
}
void GeoSet::draw_fast_path( State& state )
void GeoSet::draw_fast_path( State& state ) const
{
IndexPointer ocindex = _cindex;
@@ -264,7 +264,7 @@ void GeoSet::draw_fast_path( State& state )
}
void GeoSet::draw_alternate_path( State& state )
void GeoSet::draw_alternate_path( State& state ) const
{
if( (_color_binding == BIND_PERVERTEX) && (_colindex.null() || _colindex ==_cindex) && (_flat_shaded_skip == 0) )
{

View File

@@ -360,7 +360,7 @@ bool Geometry::areFastPathsUsed() const
return _fastPath;
}
void Geometry::drawImmediateMode(State& state)
void Geometry::drawImplementation(State& state) const
{
if (!_vertexArray.valid() || _vertexArray->getNumElements()==0) return;
if (_vertexIndices.valid() && _vertexIndices->getNumElements()==0) return;
@@ -449,7 +449,7 @@ void Geometry::drawImmediateMode(State& state)
unsigned int unit;
for(unit=0;unit<_texCoordList.size();++unit)
{
Array* array = _texCoordList[unit].first.get();
const Array* array = _texCoordList[unit].first.get();
if (array)
state.setTexCoordPointer(unit,array->getDataSize(),array->getDataType(),0,array->getDataPointer());
else
@@ -472,7 +472,7 @@ void Geometry::drawImmediateMode(State& state)
//
// draw the primitives themselves.
//
for(PrimitiveSetList::iterator itr=_primitives.begin();
for(PrimitiveSetList::const_iterator itr=_primitives.begin();
itr!=_primitives.end();
++itr)
{
@@ -590,7 +590,7 @@ void Geometry::drawImmediateMode(State& state)
//
// draw the primitives themselves.
//
for(PrimitiveSetList::iterator itr=_primitives.begin();
for(PrimitiveSetList::const_iterator itr=_primitives.begin();
itr!=_primitives.end();
++itr)
{
@@ -599,7 +599,7 @@ void Geometry::drawImmediateMode(State& state)
if (secondaryColorBinding==BIND_PER_PRIMITIVE_SET) drawSecondaryColor(secondaryColorIndex++);
if (fogCoordBinding==BIND_PER_PRIMITIVE_SET) drawFogCoord(fogCoordIndex++);
PrimitiveSet* primitiveset = itr->get();
const PrimitiveSet* primitiveset = itr->get();
GLenum mode=primitiveset->getMode();
unsigned int primLength;

View File

@@ -61,7 +61,7 @@ float ImpostorSprite::calcPixelError(const Matrix& MVPW) const
return sqrtf(max_error_sqrd);
}
void ImpostorSprite::drawImmediateMode(State&)
void ImpostorSprite::drawImplementation(State&) const
{
// when the tex env is set to REPLACE, and the
// texture is set up correctly the color has no effect.

View File

@@ -1251,7 +1251,7 @@ ShapeDrawable::~ShapeDrawable()
{
}
void ShapeDrawable::drawImmediateMode(State& state)
void ShapeDrawable::drawImplementation(State& state) const
{
if (_shape.valid())
{