Removed deprecated API

This commit is contained in:
Robert Osfield 2002-11-08 14:03:44 +00:00
parent f42205a3ef
commit feeadcdec0
3 changed files with 3 additions and 43 deletions

View File

@ -214,16 +214,8 @@ class SG_EXPORT Drawable : public Object
* without fuss and can even diable the inner draw in required.*/ * without fuss and can even diable the inner draw in required.*/
struct DrawCallback : public osg::Referenced struct DrawCallback : public osg::Referenced
{ {
#ifdef USE_DEPRECATED_API
// adapt old drawImmediateMode API into new API to keep things compiling on old code.
virtual void drawImplementation(State& state,const osg::Drawable* drawable) const { drawImmediateMode(state,const_cast<Drawable*>(drawable)); }
/** do customized draw code.*/ /** do customized draw code.*/
virtual void drawImmediateMode(State&,osg::Drawable*) const {}; virtual void drawImplementation(State& state,const osg::Drawable* drawable) const = 0;
#else
/** do customized draw code.*/
virtual void drawImplementation(State& state,const osg::Drawable* drawable) const = 0;
#endif
}; };
/** Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.*/ /** Set the DrawCallback which allows users to attach customize the drawing of existing Drawable object.*/
@ -237,26 +229,13 @@ class SG_EXPORT Drawable : public Object
#ifdef USE_DEPRECATED_API
// adapt old drawImmediateMode API into new API to keep things compiling on old code.
virtual void drawImplementation(State& state) const { (const_cast<Drawable*>(this))->drawImmediateMode(state); }
/** draw directly ignoring an OpenGL display list which could be attached.
* This is the internal draw method which does the drawing itself,
* and is the method to override when deriving from Drawable.
*/
virtual void drawImmediateMode(State&) {}
#else
/** draw directly ignoring an OpenGL display list which could be attached. /** draw directly ignoring an OpenGL display list which could be attached.
* This is the internal draw method which does the drawing itself, * This is the internal draw method which does the drawing itself,
* and is the method to override when deriving from Drawable. * and is the method to override when deriving from Drawable.
*/ */
virtual void drawImplementation(State& state) const = 0; virtual void drawImplementation(State& state) const = 0;
#endif
/** use deleteDisplayList instead of glDeleteList to allow /** use deleteDisplayList instead of glDeleteList to allow
* OpenGL display list to cached until they can be deleted * OpenGL display list to cached until they can be deleted
@ -268,6 +247,7 @@ class SG_EXPORT Drawable : public Object
* in the OpenGL context related to contextID.*/ * in the OpenGL context related to contextID.*/
static void flushDeletedDisplayLists(uint contextID); static void flushDeletedDisplayLists(uint contextID);
enum AttributeType enum AttributeType
{ {
VERTICES, VERTICES,

View File

@ -130,21 +130,6 @@ class SG_EXPORT Geometry : public Drawable
void addPrimitiveSet(PrimitiveSet* primitive) { if (primitive) _primitives.push_back(primitive); dirtyDisplayList(); dirtyBound(); } void addPrimitiveSet(PrimitiveSet* primitive) { if (primitive) _primitives.push_back(primitive); dirtyDisplayList(); dirtyBound(); }
#ifdef USE_DEPRECATED_API
typedef PrimitiveSetList PrimitiveList;
void setPrimitiveList(const PrimitiveSetList& primitives) { _primitives = primitives; dirtyDisplayList(); dirtyBound(); }
PrimitiveList& getPrimitiveList() { return _primitives; }
const PrimitiveList& getPrimitiveList() const { return _primitives; }
unsigned int getNumPrimitives() const { return _primitives.size(); }
Primitive* getPrimitive(unsigned int pos) { return _primitives[pos].get(); }
const Primitive* getPrimitive(unsigned int pos) const { return _primitives[pos].get(); }
void addPrimitive(PrimitiveSet* primitive) { if (primitive) _primitives.push_back(primitive); dirtyDisplayList(); dirtyBound(); }
#endif
/** return true if OpenGL fast paths will be used with drawing this Geometry. /** return true if OpenGL fast paths will be used with drawing this Geometry.
* Fast paths use vertex arrays, and glDrawArrays/glDrawElements. Slow paths * Fast paths use vertex arrays, and glDrawArrays/glDrawElements. Slow paths

View File

@ -153,11 +153,6 @@ class PrimitiveSet : public Object
GLenum _mode; GLenum _mode;
}; };
#ifdef USE_DEPRECATED_API
// temporary addition for backwards compatiblity.
typedef PrimitiveSet Primitive;
#endif
class SG_EXPORT DrawArrays : public PrimitiveSet class SG_EXPORT DrawArrays : public PrimitiveSet
{ {
public: public: