From Geoff Michel, spelling and typo fixes.
This commit is contained in:
@@ -32,7 +32,7 @@ class SG_EXPORT DisplaySettings : public osg::Referenced
|
||||
|
||||
public:
|
||||
|
||||
/** Maintain a DisplaySettings singleton for objects to querry at runtime.*/
|
||||
/** Maintain a DisplaySettings singleton for objects to query at runtime.*/
|
||||
static DisplaySettings* instance();
|
||||
|
||||
|
||||
|
||||
@@ -97,11 +97,11 @@ class Geometry;
|
||||
|
||||
#endif
|
||||
|
||||
// this is define to alter the way display lists are compiled inside the
|
||||
// this is defined to alter the way display lists are compiled inside the
|
||||
// the draw method, it has been found that the NVidia drivers fail completely
|
||||
// to optimize COMPILE_AND_EXECUTE in fact make it go slower than for no display
|
||||
// lists, but optimize a separate COMPILE very well?! Define it as default
|
||||
// the use of a sperate COMPILE, then glCallList rather than use COMPILE_AND_EXECUTE.
|
||||
// the use of a separate COMPILE, then glCallList rather than use COMPILE_AND_EXECUTE.
|
||||
|
||||
#define USE_SEPARATE_COMPILE_AND_EXECUTE
|
||||
|
||||
@@ -173,7 +173,7 @@ class SG_EXPORT Drawable : public Object
|
||||
inline const StateSet* getStateSet() const { return _stateset.get();}
|
||||
|
||||
/** Get the attached const StateSet,
|
||||
* if one is not already attach create one,
|
||||
* if one is not already attached create one,
|
||||
* attach it to the drawable and return a pointer to it.*/
|
||||
StateSet* getOrCreateStateSet();
|
||||
|
||||
@@ -185,7 +185,7 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
/** get bounding box of geoset.
|
||||
* Note, now made virtual to make it possible to implement user-drawn
|
||||
* objects albeit so what crudely, to be improved later.
|
||||
* objects albeit somewhat crudely, to be improved later.
|
||||
*/
|
||||
inline const BoundingBox& getBound() const
|
||||
{
|
||||
@@ -196,8 +196,8 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
|
||||
/** Set the Shape of the drawable. The shape can be used to
|
||||
* speed up collision detection or as a guide for produral
|
||||
* geometry generation - see osg::ProduralGeometry.*/
|
||||
* speed up collision detection or as a guide for procedural
|
||||
* geometry generation - see osg::Shape.*/
|
||||
inline void setShape(Shape* shape) { _shape = shape; }
|
||||
|
||||
/** Get the Shape of the Drawable.*/
|
||||
@@ -208,10 +208,10 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
|
||||
|
||||
/** Set the drawable to it can or cannot be used in conjunction with OpenGL
|
||||
* display lists. With set to true, calls to Drawable::setUseDisplayList,
|
||||
/** Set the drawable so that it can or cannot be used in conjunction with OpenGL
|
||||
* display lists. When set to true, calls to Drawable::setUseDisplayList,
|
||||
* whereas when set to false, no display lists can be created and calls
|
||||
* to setUseDisplayList are ignored, and a warning is produced. The later
|
||||
* to setUseDisplayList are ignored, and a warning is produced. The latter
|
||||
* is typically used to guard against the switching on of display lists
|
||||
* on objects with dynamic internal data such as continuous Level of Detail
|
||||
* algorithms.*/
|
||||
@@ -222,14 +222,14 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
|
||||
/** When set to true, force the draw method to use OpenGL Display List for rendering.
|
||||
If false rendering directly. If the display list has not been already
|
||||
compile the next call to draw will automatically create the display list.*/
|
||||
If false, rendering directly. If the display list has not been compiled
|
||||
already, the next call to draw will automatically create the display list.*/
|
||||
void setUseDisplayList(bool flag);
|
||||
|
||||
/** Return whether OpenGL display lists are being used for rendering.*/
|
||||
inline bool getUseDisplayList() const { return _useDisplayList; }
|
||||
|
||||
/** When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplemention
|
||||
/** When set to true, ignore the setUseDisplayList() settings, and hints to the drawImplementation
|
||||
method to use OpenGL vertex buffer objects for rendering..*/
|
||||
void setUseVertexBufferObjects(bool flag);
|
||||
|
||||
@@ -256,8 +256,10 @@ class SG_EXPORT Drawable : public Object
|
||||
Note II, compile is not intended to be overridden in subclasses.*/
|
||||
virtual void compileGLObjects(State& state) const;
|
||||
|
||||
/** release any OpenGL display lists associated with graphics context specified
|
||||
in osg::State object is supplied, or release all display lists for all graphics contexts if state pointer is NULL*/
|
||||
/**
|
||||
if osg::State object is supplied: release any OpenGL display lists associated with graphics context specified
|
||||
or
|
||||
if state pointer is NULL: release all display lists for all graphics contexts */
|
||||
virtual void releaseGLObjects(State* state=0) const;
|
||||
|
||||
struct UpdateCallback : public virtual osg::Object
|
||||
@@ -272,7 +274,7 @@ class SG_EXPORT Drawable : public Object
|
||||
virtual void update(osg::NodeVisitor*, osg::Drawable*) {}
|
||||
};
|
||||
|
||||
/** Set the UpdateCallback which allows users to attach customize the undating of an object during the update traversal.*/
|
||||
/** Set the UpdateCallback which allows users to attach customize the updating of an object during the update traversal.*/
|
||||
void setUpdateCallback(UpdateCallback* ac);
|
||||
|
||||
/** Get the non const UpdateCallback.*/
|
||||
@@ -294,7 +296,7 @@ class SG_EXPORT Drawable : public Object
|
||||
virtual bool cull(osg::NodeVisitor*, osg::Drawable*, osg::State*) const { return false; }
|
||||
};
|
||||
|
||||
/** Set the CullCallback which allows users to attach customize the culling of Drawable during the cull traversal.*/
|
||||
/** Set the CullCallback which allows users to customize the culling of Drawable during the cull traversal.*/
|
||||
void setCullCallback(CullCallback* cc) { _cullCallback=cc; }
|
||||
|
||||
/** Get the non const CullCallback.*/
|
||||
@@ -308,9 +310,9 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
/** Callback attached to an Drawable which allows the users to customize the drawing of an exist Drawable object.
|
||||
* The draw callback is implement as a replacement to the Drawable's own drawImplementation() method, if the
|
||||
* the user intends to decorate the exist draw code then simple call the drawable->drawImplementation() from
|
||||
* the user intends to decorate the existing draw code then simple call the drawable->drawImplementation() from
|
||||
* with the callbacks drawImplementation() method. This allows the users to do both pre and post callbacks
|
||||
* without fuss and can even diable the inner draw in required.*/
|
||||
* without fuss and can even disable the inner draw if required.*/
|
||||
struct DrawCallback : public virtual osg::Object
|
||||
{
|
||||
DrawCallback() {}
|
||||
@@ -343,7 +345,7 @@ class SG_EXPORT Drawable : public Object
|
||||
|
||||
|
||||
/** use deleteDisplayList instead of glDeleteList to allow
|
||||
* OpenGL display list to cached until they can be deleted
|
||||
* OpenGL display list to be cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.*/
|
||||
static void deleteDisplayList(unsigned int contextID,GLuint globj);
|
||||
@@ -353,7 +355,7 @@ class SG_EXPORT Drawable : public Object
|
||||
static void flushDeletedDisplayLists(unsigned int contextID,double currentTime, double& availableTime);
|
||||
|
||||
/** use deleteVertexBufferObject instead of glDeleteList to allow
|
||||
* OpenGL buffer objects to cached until they can be deleted
|
||||
* OpenGL buffer objects to be cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.*/
|
||||
static void deleteVertexBufferObject(unsigned int contextID,GLuint globj);
|
||||
@@ -412,8 +414,9 @@ class SG_EXPORT Drawable : public Object
|
||||
/** return true if the Drawable subclass supports accept(AttributeFunctor&).*/
|
||||
virtual bool supports(AttributeFunctor&) const { return false; }
|
||||
|
||||
/** accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.
|
||||
* return true if functor handled by drawable, return false on failure of drawable to generate functor calls.*/
|
||||
/** accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
||||
* return true if functor handled by drawable,
|
||||
* return false on failure of drawable to generate functor calls.*/
|
||||
virtual void accept(AttributeFunctor&) {}
|
||||
|
||||
|
||||
@@ -441,8 +444,9 @@ class SG_EXPORT Drawable : public Object
|
||||
/** return true if the Drawable subclass supports accept(ConstAttributeFunctor&).*/
|
||||
virtual bool supports(ConstAttributeFunctor&) const { return false; }
|
||||
|
||||
/** accept an AttributeFunctor and call its methods to tell it about the interal attributes that this Drawable has.
|
||||
* return true if functor handled by drawable, return false on failure of drawable to generate functor calls.*/
|
||||
/** accept an AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has.
|
||||
* return true if functor handled by drawable,
|
||||
* return false on failure of drawable to generate functor calls.*/
|
||||
virtual void accept(ConstAttributeFunctor&) const {}
|
||||
|
||||
|
||||
@@ -496,24 +500,24 @@ class SG_EXPORT Drawable : public Object
|
||||
/** return true if the Drawable subclass supports accept(PrimitiveFunctor&).*/
|
||||
virtual bool supports(PrimitiveFunctor&) const { return false; }
|
||||
|
||||
/** accept a PrimtiveFunctor and call its methods to tell it about the interal primtives that this Drawable has.
|
||||
/** accept a PrimitiveFunctor and call its methods to tell it about the internal primitives that this Drawable has.
|
||||
* return true if functor handled by drawable, return false on failure of drawable to generate functor calls.
|
||||
* Note, PrimtiveFunctor only provide const access of the primtives, as primitives may be procedurally generated
|
||||
* Note, PrimtiveFunctor only provides const access of the primitives, as primitives may be procedurally generated
|
||||
* so one cannot modify it.*/
|
||||
virtual void accept(PrimitiveFunctor&) const {}
|
||||
|
||||
/** return true if the Drawable subclass supports accept(PrimitiveIndexFunctor&).*/
|
||||
virtual bool supports(PrimitiveIndexFunctor&) const { return false; }
|
||||
|
||||
/** accept a PrimtiveIndexFunctor and call its methods to tell it about the interal primtives that this Drawable has.
|
||||
/** accept a PrimitiveIndexFunctor and call its methods to tell it about the internal primitives that this Drawable has.
|
||||
* return true if functor handled by drawable, return false on failure of drawable to generate functor calls.
|
||||
* Note, PrimtiveIndexFunctor only provide const access of the primtives, as primitives may be procedurally generated
|
||||
* Note, PrimtiveIndexFunctor only provide const access of the primitives, as primitives may be procedurally generated
|
||||
* so one cannot modify it.*/
|
||||
virtual void accept(PrimitiveIndexFunctor&) const {}
|
||||
|
||||
|
||||
/** Extensions class which encapsulates the querring of extensions and
|
||||
* associated function pointers, and provide convinience wrappers to
|
||||
/** Extensions class which encapsulates the querying of extensions and
|
||||
* associated function pointers, and provide convenience wrappers to
|
||||
* check for the extensions or use the associated functions.*/
|
||||
class SG_EXPORT Extensions : public osg::Referenced
|
||||
{
|
||||
@@ -675,11 +679,11 @@ class SG_EXPORT Drawable : public Object
|
||||
};
|
||||
|
||||
/** Function to call to get the extension of a specified context.
|
||||
* If the Exentsion object for that context has not yet been created then
|
||||
* If the Exentsion object for that context has not yet been created
|
||||
* and the 'createIfNotInitalized' flag been set to false then returns NULL.
|
||||
* If 'createIfNotInitalized' is true then the Extensions object is
|
||||
* automatically created. However, in this case the extension object
|
||||
* only be created with the graphics context associated with ContextID..*/
|
||||
* automatically created. However, in this case the extension object is
|
||||
* only created with the graphics context associated with ContextID..*/
|
||||
static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized);
|
||||
|
||||
/** setExtensions allows users to override the extensions across graphics contexts.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef OSG_EXPORT
|
||||
#define OSG_EXPORT 1
|
||||
|
||||
// define used to include in API which is being fazed out
|
||||
// define USE_DEPRECATED_API is used to include in API which is being fazed out
|
||||
// if you can compile your apps with this turned off you are
|
||||
// well placed for compatablity with future versions.
|
||||
// #define USE_DEPRECATED_API
|
||||
|
||||
@@ -177,7 +177,7 @@ class SG_EXPORT FragmentProgram : public StateAttribute
|
||||
/** Get list of Program Parameters */
|
||||
inline LocalParamList& getLocalParamList() { return _programLocalParameters; }
|
||||
|
||||
/** Get const list of Program Parameters */
|
||||
/** Get const list of Program Parameters */
|
||||
inline const LocalParamList& getLocalParamList() const { return _programLocalParameters; }
|
||||
|
||||
/** Matrix */
|
||||
@@ -190,7 +190,7 @@ class SG_EXPORT FragmentProgram : public StateAttribute
|
||||
void dirtyFragmentProgramObject();
|
||||
|
||||
/** use deleteFragmentProgramObject instead of glDeletePrograms to allow
|
||||
* OpenGL Fragment Program objects to cached until they can be deleted
|
||||
* OpenGL Fragment Program objects to be cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.*/
|
||||
static void deleteFragmentProgramObject(unsigned int contextID,GLuint handle);
|
||||
@@ -205,11 +205,11 @@ class SG_EXPORT FragmentProgram : public StateAttribute
|
||||
|
||||
/** release an OpenGL objects in specified graphics context if State
|
||||
object is passed, otherwise release OpenGL objexts for all graphics context if
|
||||
State object pointer NULL.*/
|
||||
State object pointer == NULL.*/
|
||||
virtual void releaseGLObjects(State* state=0) const;
|
||||
|
||||
/** Extensions class which encapsulates the querring of extensions and
|
||||
* associated function pointers, and provide convinience wrappers to
|
||||
/** Extensions class which encapsulates the querying of extensions and
|
||||
* associated function pointers, and provide convenience wrappers to
|
||||
* check for the extensions or use the associated functions.*/
|
||||
class SG_EXPORT Extensions : public osg::Referenced
|
||||
{
|
||||
@@ -245,10 +245,10 @@ class SG_EXPORT FragmentProgram : public StateAttribute
|
||||
};
|
||||
|
||||
/** Function to call to get the extension of a specified context.
|
||||
* If the Exentsion object for that context has not yet been created then
|
||||
* and the 'createIfNotInitalized' flag been set to false then returns NULL.
|
||||
* If the Extension object for that context has not yet been created and the
|
||||
* 'createIfNotInitalized' flag has been set to false then returns NULL.
|
||||
* If 'createIfNotInitalized' is true then the Extensions object is
|
||||
* automatically created. However, in this case the extension object
|
||||
* automatically created. However, in this case the extension object will
|
||||
* only be created with the graphics context associated with ContextID..*/
|
||||
static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized);
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ using std::tm;
|
||||
namespace osg
|
||||
{
|
||||
|
||||
/** Class which encapsulates the frame number, reference time and calander
|
||||
/** Class which encapsulates the frame number, reference time and calendar
|
||||
* time of specific frame, used to synchonize operations on the scene graph
|
||||
* and other machines when using a graphics cluster. Note the calander
|
||||
* and other machines when using a graphics cluster. Note the calendar
|
||||
* time can be an artificial simulation time or capture the real time
|
||||
* of day etc.*/
|
||||
class SG_EXPORT FrameStamp : public Referenced
|
||||
@@ -64,11 +64,11 @@ class SG_EXPORT FrameStamp : public Referenced
|
||||
double _referenceTime;
|
||||
|
||||
|
||||
// member varaibles of time.h's tm structure, copied here to
|
||||
// ensure that all data is no dynamic. The tm structure itself
|
||||
// member variables of time.h's tm structure, copied here to
|
||||
// ensure that all data is not dynamic. The tm structure itself
|
||||
// is not completely consistent betweem implementations, which
|
||||
// could be a problem when sending the FrameStamp across a network
|
||||
// with differnt versions of tm (i.e mixing Unix and Windows.)
|
||||
// with different versions of tm (i.e mixing Unix and Windows.)
|
||||
int tm_sec; /* Seconds. [0-60] (1 leap second) */
|
||||
int tm_min; /* Minutes. [0-59] */
|
||||
int tm_hour; /* Hours. [0-23] */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace osg {
|
||||
|
||||
/** Class to specifies the orientation of front-facing polygons.
|
||||
/** Class to specify the orientation of front-facing polygons.
|
||||
*/
|
||||
class SG_EXPORT FrontFace : public StateAttribute
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ class SG_EXPORT Geode : public Node
|
||||
META_Node(osg, Geode);
|
||||
|
||||
/** Add Drawable to Geode.
|
||||
* If gset is not NULL and is not contained in Geode then increment its
|
||||
* If drawable is not NULL and is not contained in Geode then increment its
|
||||
* reference count, add it to the drawables list and dirty the bounding
|
||||
* sphere to force it to recompute on next getBound() and return true for success.
|
||||
* Otherwise return false.
|
||||
@@ -43,16 +43,16 @@ class SG_EXPORT Geode : public Node
|
||||
virtual bool addDrawable( Drawable *drawable );
|
||||
|
||||
/** Remove Drawable from Geode.
|
||||
* Equivalent to setDrawabke(getDrawableIndex(orignChild),node),
|
||||
* see docs for setNode for futher details on implementation.*/
|
||||
* Equivalent to setDrawable(getDrawableIndex(originChild),node),
|
||||
* see docs for setNode for further details on implementation.*/
|
||||
virtual bool removeDrawable( Drawable *drawable );
|
||||
|
||||
/** Remove drawable(s) from the specified position in Geode's drawable list.*/
|
||||
virtual bool removeDrawable(unsigned int i,unsigned int numDrawablesToRemove=1);
|
||||
|
||||
/** Replace specified Drawable with another Drawable.
|
||||
* Equivalent to setDrawable(getDrawableIndex(orignChild),node),
|
||||
* see docs for setDrawable for futher details on implementation.*/
|
||||
* Equivalent to setDrawable(getDrawableIndex(originChild),node),
|
||||
* see docs for setDrawable for further details on implementation.*/
|
||||
virtual bool replaceDrawable( Drawable *origDraw, Drawable *newDraw );
|
||||
|
||||
/** set drawable at position i.
|
||||
@@ -66,7 +66,7 @@ class SG_EXPORT Geode : public Node
|
||||
*/
|
||||
virtual bool setDrawable( unsigned int i, Drawable* drawable );
|
||||
|
||||
/** return the number of drawable's.*/
|
||||
/** return the number of drawables.*/
|
||||
inline unsigned int getNumDrawables() const { return _drawables.size(); }
|
||||
|
||||
/** return drawable at position i.*/
|
||||
@@ -103,7 +103,7 @@ class SG_EXPORT Geode : public Node
|
||||
/** compile OpenGL Display List for each drawable.*/
|
||||
void compileDrawables(State& state);
|
||||
|
||||
/** return the Geode's bounding box, which the union of all the
|
||||
/** return the Geode's bounding box, which is the union of all the
|
||||
* bounding boxes of the geode's drawables.*/
|
||||
inline const BoundingBox& getBoundingBox() const
|
||||
{
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace osg {
|
||||
|
||||
/** Simple stack implementation that keeps the back() cached locally for fast access
|
||||
* rather than at the back of the vector which is the traditional stack implementation.
|
||||
* A conventional std::vector<> stores the rest of the stack. The fast_back_stack
|
||||
* although contains a stl container it only implments the back push_back(),pop_back()
|
||||
* A conventional std::vector<> stores the rest of the stack. Although fast_back_stack
|
||||
* contains a stl container it only implements the back push_back(),pop_back()
|
||||
* and back() methods so is not as general purpose as stl stack implementation.
|
||||
* The focus of the fast_back_stack is purly to maximize the speed at which the
|
||||
* The focus of the fast_back_stack is purely to maximize the speed at which the
|
||||
* back can be accessed.*/
|
||||
|
||||
template<class T>
|
||||
|
||||
Reference in New Issue
Block a user