Removed deprecated API
This commit is contained in:
parent
f42205a3ef
commit
feeadcdec0
@ -214,16 +214,8 @@ class SG_EXPORT Drawable : public Object
|
||||
* without fuss and can even diable the inner draw in required.*/
|
||||
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.*/
|
||||
virtual void drawImmediateMode(State&,osg::Drawable*) const {};
|
||||
#else
|
||||
/** do customized draw code.*/
|
||||
virtual void drawImplementation(State& state,const osg::Drawable* drawable) const = 0;
|
||||
#endif
|
||||
virtual void drawImplementation(State& state,const osg::Drawable* drawable) const = 0;
|
||||
};
|
||||
|
||||
/** 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.
|
||||
* This is the internal draw method which does the drawing itself,
|
||||
* and is the method to override when deriving from Drawable.
|
||||
*/
|
||||
virtual void drawImplementation(State& state) const = 0;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/** use deleteDisplayList instead of glDeleteList to allow
|
||||
* 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.*/
|
||||
static void flushDeletedDisplayLists(uint contextID);
|
||||
|
||||
|
||||
enum AttributeType
|
||||
{
|
||||
VERTICES,
|
||||
|
@ -130,21 +130,6 @@ class SG_EXPORT Geometry : public Drawable
|
||||
|
||||
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.
|
||||
* Fast paths use vertex arrays, and glDrawArrays/glDrawElements. Slow paths
|
||||
|
@ -153,11 +153,6 @@ class PrimitiveSet : public Object
|
||||
GLenum _mode;
|
||||
};
|
||||
|
||||
#ifdef USE_DEPRECATED_API
|
||||
// temporary addition for backwards compatiblity.
|
||||
typedef PrimitiveSet Primitive;
|
||||
#endif
|
||||
|
||||
class SG_EXPORT DrawArrays : public PrimitiveSet
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user