25#define OSG_DEPRECATED_GEOMETRY_BINDING 1
46 typedef std::vector< osg::ref_ptr<osg::Array> >
ArrayList;
250#if defined(OSG_DEPRECATED_GEOMETRY_BINDING)
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
Vec3f Vec3
Definition Vec3:21
OSG_EXPORT Geometry * createTexturedQuadGeometry(const Vec3 &corner, const Vec3 &widthVec, const Vec3 &heightVec, float l, float b, float r, float t)
Convenience function to be used for creating quad geometry with texture coords.
Binding
The scope of applicability of the values in this array.
Definition Array:130
@ BIND_UNDEFINED
Definition Array:131
Definition BufferObject:599
Definition BufferObject:622
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
osg::ref_ptr< Array > _fogCoordArray
Definition Geometry:230
Array * getVertexArray()
Definition Geometry:49
virtual void accept(Drawable::AttributeFunctor &af)
Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes th...
const PrimitiveSet * getPrimitiveSet(unsigned int pos) const
Definition Geometry:111
const PrimitiveSetList & getPrimitiveSetList() const
Definition Geometry:107
Array * getSecondaryColorArray()
Definition Geometry:69
virtual unsigned int getGLObjectSizeHint() const
Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with...
virtual const Geometry * asGeometry() const
convert 'const this' into a const Geometry pointer if Node is a Geometry, otherwise return 0.
Definition Geometry:42
const Array * getTexCoordArray(unsigned int unit) const
void setNormalArray(Array *array)
Definition Geometry:53
PrimitiveSetList _primitives
Definition Geometry:225
void setTexCoordArray(unsigned int unit, Array *array, osg::Array::Binding binding)
void setVertexAttribArray(unsigned int index, Array *array, osg::Array::Binding binding)
void setFogCoordArray(Array *array)
Definition Geometry:73
unsigned int getPrimitiveSetIndex(const PrimitiveSet *primitiveset) const
Get the index number of a primitive set, return a value between 0 and getNumPrimitiveSet()-1 if found...
osg::ref_ptr< Array > _normalArray
Definition Geometry:227
virtual void dirtyGLObjects()
Force a recompile on next draw() of any OpenGL objects associated with this geoset.
bool _containsDeprecatedData
Definition Geometry:234
PrimitiveSet * getPrimitiveSet(unsigned int pos)
Definition Geometry:110
void setPrimitiveSetList(const PrimitiveSetList &primitives)
void setColorArray(Array *array)
Definition Geometry:60
void setTexCoordArray(unsigned int unit, Array *array)
Definition Geometry:79
void drawVertexArraysImplementation(RenderInfo &renderInfo) const
Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calli...
osg::ref_ptr< Array > _vertexArray
Definition Geometry:226
const Array * getColorArray() const
Definition Geometry:63
unsigned int getNumTexCoordArrays() const
Definition Geometry:84
virtual Geometry * asGeometry()
convert 'this' into a Geometry pointer if Node is a Geometry, otherwise return 0.
Definition Geometry:41
const Array * getFogCoordArray() const
Definition Geometry:76
virtual void drawImplementation(RenderInfo &renderInfo) const
Draw Geometry directly ignoring an OpenGL display list which could be attached.
Array * getVertexAttribArray(unsigned int index)
std::vector< osg::DrawElements * > DrawElementsList
Definition Geometry:160
void setSecondaryColorArray(Array *array)
Definition Geometry:67
virtual void releaseGLObjects(State *state=0) const
If State is non-zero, this function releases OpenGL objects for the specified graphics context.
void setVertexAttribNormalize(unsigned int index, GLboolean norm)
deprecated, use array->set*Normalize(..).
void setColorArray(Array *array, osg::Array::Binding binding)
osg::VertexBufferObject * getOrCreateVertexBufferObject()
const ArrayList & getVertexAttribArrayList() const
Definition Geometry:98
void setNormalBinding(AttributeBinding ab)
deprecated, use array->set*Binding(..).
void addElementBufferObjectIfRequired(osg::PrimitiveSet *primitiveSet)
PrimitiveSetList & getPrimitiveSetList()
Definition Geometry:106
virtual bool supports(const PrimitiveFunctor &) const
Return true, osg::Geometry does support accept(PrimitiveFunctor&).
Definition Geometry:203
void setVertexAttribArray(unsigned int index, Array *array)
Definition Geometry:89
const Array * getVertexArray() const
Definition Geometry:50
ArrayList & getTexCoordArrayList()
Definition Geometry:86
bool addPrimitiveSet(PrimitiveSet *primitiveset)
Add a primitive set to the geometry.
ArrayList _vertexAttribList
Definition Geometry:232
void setTexCoordArrayList(const ArrayList &arrrayList)
const Array * getSecondaryColorArray() const
Definition Geometry:70
bool getDrawElementsList(DrawElementsList &drawElementsList) const
AttributeBinding getFogCoordBinding() const
AttributeBinding getColorBinding() const
GLboolean getVertexAttribNormalize(unsigned int index) const
deprecated, use array->get*Normalize(..).
AttributeBinding
deprecated, Same values as Array::Binding.
Definition Geometry:253
@ BIND_PER_VERTEX
Definition Geometry:257
@ BIND_PER_PRIMITIVE_SET
Definition Geometry:256
@ BIND_OFF
Definition Geometry:254
@ BIND_OVERALL
Definition Geometry:255
Array * getNormalArray()
Definition Geometry:55
void setFogCoordBinding(AttributeBinding ab)
virtual void accept(PrimitiveIndexFunctor &pf) const
Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Dra...
bool getArrayList(ArrayList &arrayList) const
virtual void compileGLObjects(RenderInfo &renderInfo) const
Immediately compile this Drawable into an OpenGL Display List/VertexBufferObjects.
std::vector< ref_ptr< PrimitiveSet > > PrimitiveSetList
Definition Geometry:102
virtual void accept(PrimitiveFunctor &pf) const
Accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Dra...
AttributeBinding getNormalBinding() const
deprecated, use array->get*Binding(..).
unsigned int getNumPrimitiveSets() const
Definition Geometry:109
bool checkForDeprecatedData()
fallback for deprecated functionality.
void duplicateSharedArrays()
duplicate any shared arrays.
virtual bool supports(const Drawable::AttributeFunctor &) const
Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&).
Definition Geometry:191
Array * getFogCoordArray()
Definition Geometry:75
bool insertPrimitiveSet(unsigned int i, PrimitiveSet *primitiveset)
Insert a primitive set to the specified position in geometry's primitive set list.
virtual void resizeGLObjectBuffers(unsigned int maxSize)
Resize any per context GLObject buffers to specified size.
void configureBufferObjects()
Convenience method that checks all the vertex arrays to make sure that the buffer objects are all ass...
osg::ref_ptr< Array > _colorArray
Definition Geometry:228
void setVertexAttribArrayList(const ArrayList &arrayList)
unsigned int getNumVertexAttribArrays() const
Definition Geometry:95
bool containsDeprecatedData() const
Return true if the deprecated use array indices or BIND_PER_PRIMITIVE binding has been assigned to ar...
Definition Geometry:242
virtual void accept(Drawable::ConstAttributeFunctor &af) const
Accept a Drawable::ConstAttributeFunctor and call its methods to tell it about the internal attribute...
ArrayList _texCoordList
Definition Geometry:231
Array * getTexCoordArray(unsigned int unit)
void fixDeprecatedData()
fallback for deprecated functionality.
virtual void setUseVertexBufferObjects(bool flag)
When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation method...
Geometry(const Geometry &geometry, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
ArrayList & getVertexAttribArrayList()
Definition Geometry:97
void setVertexAttribBinding(unsigned int index, AttributeBinding ab)
bool removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove=1)
Remove primitive set(s) from the specified position in geometry's primitive set list.
void setVertexArray(Array *array)
const Array * getVertexAttribArray(unsigned int index) const
void setFogCoordArray(Array *array, osg::Array::Binding binding)
void drawPrimitivesImplementation(RenderInfo &renderInfo) const
dispatch the primitives to OpenGL, called by drawImplemtation() after calling drawVertexArraysImpleme...
Array * getColorArray()
Definition Geometry:62
std::vector< osg::ref_ptr< osg::Array > > ArrayList
Definition Geometry:46
void setSecondaryColorArray(Array *array, osg::Array::Binding binding)
void setNormalArray(Array *array, osg::Array::Binding binding)
const ArrayList & getTexCoordArrayList() const
Definition Geometry:87
osg::ElementBufferObject * getOrCreateElementBufferObject()
osg::ref_ptr< Array > _secondaryColorArray
Definition Geometry:229
void addVertexBufferObjectIfRequired(osg::Array *array)
AttributeBinding getVertexAttribBinding(unsigned int index) const
bool containsSharedArrays() const
return true if any arrays are shared.
bool setPrimitiveSet(unsigned int i, PrimitiveSet *primitiveset)
Set a primitive set to the specified position in geometry's primitive set list.
virtual bool supports(const PrimitiveIndexFunctor &) const
Return true, osg::Geometry does support accept(PrimitiveIndexFunctor&).
Definition Geometry:209
virtual bool supports(const Drawable::ConstAttributeFunctor &) const
Return true, osg::Geometry does support accept(Drawable::ConstAttributeFunctor&).
Definition Geometry:197
void setSecondaryColorBinding(AttributeBinding ab)
AttributeBinding getSecondaryColorBinding() const
virtual VertexArrayState * createVertexArrayStateImplementation(RenderInfo &renderInfo) const
Implementation of Create the VertexArrayState object.
const Array * getNormalArray() const
Definition Geometry:56
void setColorBinding(AttributeBinding ab)
ConfigureBufferObjectsVisitor()
Definition Geometry:286
void apply(osg::Geometry &geometry)
Definition Geometry:289
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
@ TRAVERSE_ALL_CHILDREN
Definition NodeVisitor:89
NodeVisitor(TraversalMode tm=TRAVERSE_NONE)
A PrimitiveFunctor is used (in conjunction with osg::Drawable::accept (PrimitiveFunctor&)) to get acc...
Definition PrimitiveSet:54
Definition PrimitiveSet:103
Definition PrimitiveSet:125
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Definition VertexArrayState:25
#define OSG_EXPORT
Definition Export:39