From Albert Luaces, typo fixes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14883 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
parent
d14a602a59
commit
ba9dfb2ff6
@ -342,7 +342,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
int setProcessorAffinity( unsigned int cpunum );
|
int setProcessorAffinity( unsigned int cpunum );
|
||||||
|
|
||||||
/** microSleep method, equivilant to the posix usleep(microsec).
|
/** microSleep method, equivalent to the posix usleep(microsec).
|
||||||
* This is not strictly thread API but is used
|
* This is not strictly thread API but is used
|
||||||
* so often with threads. It's basically UNIX usleep. Parameter is
|
* so often with threads. It's basically UNIX usleep. Parameter is
|
||||||
* number of microseconds we current thread to sleep. Returns 0 on
|
* number of microseconds we current thread to sleep. Returns 0 on
|
||||||
|
@ -47,7 +47,7 @@ inline void clampLEQUAL(T& value,const T maxValue,const char* valueName)
|
|||||||
|
|
||||||
/** If value is between or equal to minValue and maxValue do nothing - legal
|
/** If value is between or equal to minValue and maxValue do nothing - legal
|
||||||
* value, Otherwise clamp value to specified range and warn that valueName
|
* value, Otherwise clamp value to specified range and warn that valueName
|
||||||
* was clamped. Equivilant to calling
|
* was clamped. Equivalent to calling
|
||||||
* clampGEQUAL( value, minValue, valueName );
|
* clampGEQUAL( value, minValue, valueName );
|
||||||
* clampLEQUAL( value, maxValue, valueName ); */
|
* clampLEQUAL( value, maxValue, valueName ); */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -95,7 +95,7 @@ inline void clampArrayElementLEQUAL(A& value,unsigned int i,const T maxValue,con
|
|||||||
|
|
||||||
/** If value[i] is between or equal to minValue and maxValue do nothing - legal
|
/** If value[i] is between or equal to minValue and maxValue do nothing - legal
|
||||||
* value, Otherwise clamp value[i] to specified range and warn that
|
* value, Otherwise clamp value[i] to specified range and warn that
|
||||||
* valueName[i] was clamped. Equivilant to calling
|
* valueName[i] was clamped. Equivalent to calling
|
||||||
* clampArrayElementGEQUAL( value, i, minValue, valueName );
|
* clampArrayElementGEQUAL( value, i, minValue, valueName );
|
||||||
* clampArrayElementLEQUAL( value, i, maxValue, valueName ); */
|
* clampArrayElementLEQUAL( value, i, maxValue, valueName ); */
|
||||||
template <typename A, typename T>
|
template <typename A, typename T>
|
||||||
|
@ -232,7 +232,7 @@ class OSG_EXPORT Geometry : public Drawable
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
/** Return true if the deprecated use array indicies or BIND_PER_PRIMITIVE binding has been assigned to arrays.*/
|
/** Return true if the deprecated use array indices or BIND_PER_PRIMITIVE binding has been assigned to arrays.*/
|
||||||
bool containsDeprecatedData() const { return _containsDeprecatedData; }
|
bool containsDeprecatedData() const { return _containsDeprecatedData; }
|
||||||
|
|
||||||
/** fallback for deprecated functionality. Return true if the Geometry contains any array indices or BIND_PER_PRIMITIVE arrays. */
|
/** fallback for deprecated functionality. Return true if the Geometry contains any array indices or BIND_PER_PRIMITIVE arrays. */
|
||||||
@ -294,7 +294,7 @@ inline Geometry* createTexturedQuadGeometry(const Vec3& corner,const Vec3& width
|
|||||||
namespace deprecated_osg {
|
namespace deprecated_osg {
|
||||||
|
|
||||||
/** Geometry class contaning deprecated features.
|
/** Geometry class contaning deprecated features.
|
||||||
* Users should only use deprecatged_osg::Geometry when absolutely neccessary for keeping things compiling,
|
* Users should only use deprecated_osg::Geometry when absolutely necessary for keeping things compiling,
|
||||||
* it is recommended that you should migrate your code to work just with osg::Geometry as existing
|
* it is recommended that you should migrate your code to work just with osg::Geometry as existing
|
||||||
* deprecated_osg::Geometry will be removed in future release.
|
* deprecated_osg::Geometry will be removed in future release.
|
||||||
*/
|
*/
|
||||||
|
@ -224,7 +224,7 @@ class OSG_EXPORT Image : public BufferData
|
|||||||
* Typically used to copy to an already allocated image, such as creating
|
* Typically used to copy to an already allocated image, such as creating
|
||||||
* a 3D image from a stack 2D images.
|
* a 3D image from a stack 2D images.
|
||||||
* If this Image is empty then image data is created to
|
* If this Image is empty then image data is created to
|
||||||
* accomodate the source image in its offset position.
|
* accommodate the source image in its offset position.
|
||||||
* If source is NULL then no operation happens, this Image is left unchanged.
|
* If source is NULL then no operation happens, this Image is left unchanged.
|
||||||
*/
|
*/
|
||||||
virtual void copySubImage(int s_offset, int t_offset, int r_offset, const osg::Image* source);
|
virtual void copySubImage(int s_offset, int t_offset, int r_offset, const osg::Image* source);
|
||||||
|
@ -201,7 +201,7 @@ extern OSG_EXPORT bool clearImageToColor(osg::Image* image, const osg::Vec4& col
|
|||||||
|
|
||||||
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
||||||
|
|
||||||
/** Search through the list of Images and find the maximum number of components used amoung the images.*/
|
/** Search through the list of Images and find the maximum number of components used among the images.*/
|
||||||
extern OSG_EXPORT unsigned int maximimNumOfComponents(const ImageList& imageList);
|
extern OSG_EXPORT unsigned int maximimNumOfComponents(const ImageList& imageList);
|
||||||
|
|
||||||
/** create a 3D osg::Image from a list of osg::Image.*/
|
/** create a 3D osg::Image from a list of osg::Image.*/
|
||||||
|
@ -86,7 +86,7 @@ class OSG_EXPORT Object : public Referenced
|
|||||||
by derived classes.*/
|
by derived classes.*/
|
||||||
virtual const char* className() const = 0;
|
virtual const char* className() const = 0;
|
||||||
|
|
||||||
/** return the compound class name that combines the libary name and class name.*/
|
/** return the compound class name that combines the library name and class name.*/
|
||||||
std::string getCompoundClassName() const { return std::string(libraryName()) + std::string("::") + std::string(className()); }
|
std::string getCompoundClassName() const { return std::string(libraryName()) + std::string("::") + std::string(className()); }
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class OSG_EXPORT TransferFunction1D : public osg::TransferFunction
|
|||||||
/** Set the color for a specified transfer function value.
|
/** Set the color for a specified transfer function value.
|
||||||
* updateImage defaults to true, and tells the setColor function to update the associate osg::Image that
|
* updateImage defaults to true, and tells the setColor function to update the associate osg::Image that
|
||||||
* tracks the color map. Pass in false as the updateImage parameter if you are setting up many values
|
* tracks the color map. Pass in false as the updateImage parameter if you are setting up many values
|
||||||
* at once to avoid recomputation of the image data, then once all setColor calls are made explictly call
|
* at once to avoid recomputation of the image data, then once all setColor calls are made explicitly call
|
||||||
* updateImage() to bring the osg::Image back into sync with the color map. */
|
* updateImage() to bring the osg::Image back into sync with the color map. */
|
||||||
void setColor(float v, const osg::Vec4& color, bool updateImage=true);
|
void setColor(float v, const osg::Vec4& color, bool updateImage=true);
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ namespace osg {
|
|||||||
* To use the observer_ptr<> robustly in multi-threaded applications it is recommend to access the pointer via
|
* To use the observer_ptr<> robustly in multi-threaded applications it is recommend to access the pointer via
|
||||||
* the lock() method that passes back a ref_ptr<> that safely takes a reference to the object to prevent deletion
|
* the lock() method that passes back a ref_ptr<> that safely takes a reference to the object to prevent deletion
|
||||||
* during usage of the object. In certain conditions it may be safe to use the pointer directly without using lock(),
|
* during usage of the object. In certain conditions it may be safe to use the pointer directly without using lock(),
|
||||||
* which will confer a perfomance advantage, the conditions are:
|
* which will confer a performance advantage, the conditions are:
|
||||||
* 1) The data structure is only accessed/deleted in single threaded/serial way.
|
* 1) The data structure is only accessed/deleted in single threaded/serial way.
|
||||||
* 2) The data strucutre is guarenteed by high level management of data strucutures and threads which avoid
|
* 2) The data strucutre is guaranteed by high level management of data strucutures and threads which avoid
|
||||||
* possible situations where the observer_ptr<>'s object may be deleted by one thread whilst being accessed
|
* possible situations where the observer_ptr<>'s object may be deleted by one thread whilst being accessed
|
||||||
* by another.
|
* by another.
|
||||||
* If you are in any doubt about whether it is safe to access the object safe then use the
|
* If you are in any doubt about whether it is safe to access the object safe then use the
|
||||||
|
@ -97,7 +97,7 @@ class ref_ptr
|
|||||||
/** release the pointer from ownership by this ref_ptr<>, decrementing the objects refencedCount() via unref_nodelete() to prevent the Object
|
/** release the pointer from ownership by this ref_ptr<>, decrementing the objects refencedCount() via unref_nodelete() to prevent the Object
|
||||||
* object from being deleted even if the reference count goes to zero. Use when using a local ref_ptr<> to an Object that you want to return
|
* object from being deleted even if the reference count goes to zero. Use when using a local ref_ptr<> to an Object that you want to return
|
||||||
* from a function/method via a C pointer, whilst preventing the normal ref_ptr<> destructor from cleaning up the object. When using release()
|
* from a function/method via a C pointer, whilst preventing the normal ref_ptr<> destructor from cleaning up the object. When using release()
|
||||||
* you are implicitly expecting other code to take over managment of the object, otherwise a memory leak will result. */
|
* you are implicitly expecting other code to take over management of the object, otherwise a memory leak will result. */
|
||||||
T* release() { T* tmp=_ptr; if (_ptr) _ptr->unref_nodelete(); _ptr=0; return tmp; }
|
T* release() { T* tmp=_ptr; if (_ptr) _ptr->unref_nodelete(); _ptr=0; return tmp; }
|
||||||
|
|
||||||
void swap(ref_ptr& rp) { T* tmp=_ptr; _ptr=rp._ptr; rp._ptr=tmp; }
|
void swap(ref_ptr& rp) { T* tmp=_ptr; _ptr=rp._ptr; rp._ptr=tmp; }
|
||||||
|
@ -176,16 +176,16 @@ public:
|
|||||||
/// Properties supported for a range of classes, used for white and black lists
|
/// Properties supported for a range of classes, used for white and black lists
|
||||||
typedef std::map<std::string, PropertyMap> ObjectPropertyMap;
|
typedef std::map<std::string, PropertyMap> ObjectPropertyMap;
|
||||||
|
|
||||||
/// Get the list of properties that are explictly defined as supported
|
/// Get the list of properties that are explicitly defined as supported
|
||||||
ObjectPropertyMap& getWhiteList() { return _whiteList; }
|
ObjectPropertyMap& getWhiteList() { return _whiteList; }
|
||||||
|
|
||||||
/// Get the const list of properties that are explictly defined as supported
|
/// Get the const list of properties that are explicitly defined as supported
|
||||||
const ObjectPropertyMap& getWhiteList() const { return _whiteList; }
|
const ObjectPropertyMap& getWhiteList() const { return _whiteList; }
|
||||||
|
|
||||||
/// Get the list of properties that are explictly defined as not supported
|
/// Get the list of properties that are explicitly defined as not supported
|
||||||
ObjectPropertyMap& getBlackList() { return _blackList; }
|
ObjectPropertyMap& getBlackList() { return _blackList; }
|
||||||
|
|
||||||
/// Get the const list of properties that are explictly defined as not supported
|
/// Get the const list of properties that are explicitly defined as not supported
|
||||||
const ObjectPropertyMap& getBlackList() const { return _blackList; }
|
const ObjectPropertyMap& getBlackList() const { return _blackList; }
|
||||||
|
|
||||||
osgDB::ObjectWrapper* getObjectWrapper(const osg::Object* object) const;
|
osgDB::ObjectWrapper* getObjectWrapper(const osg::Object* object) const;
|
||||||
|
@ -66,7 +66,7 @@ namespace osgDB
|
|||||||
ObjectData(const std::string & absolutePath, const std::string & relativePath, bool written) : absolutePath(absolutePath), relativePath(relativePath), written(written) {}
|
ObjectData(const std::string & absolutePath, const std::string & relativePath, bool written) : absolutePath(absolutePath), relativePath(relativePath), written(written) {}
|
||||||
std::string absolutePath;
|
std::string absolutePath;
|
||||||
std::string relativePath;
|
std::string relativePath;
|
||||||
bool written; ///< Says if write succeded or not.
|
bool written; ///< Says if write succeeded or not.
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Set of written objects, with their absolute writing path.
|
/// Set of written objects, with their absolute writing path.
|
||||||
|
@ -216,7 +216,7 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
|
|||||||
|
|
||||||
typedef osgDB::Options Options;
|
typedef osgDB::Options Options;
|
||||||
|
|
||||||
/** Determine if a file exists, normally the default implementation will be appropiate for local file access
|
/** Determine if a file exists, normally the default implementation will be appropriate for local file access
|
||||||
* but with plugins like the libcurl based one it will return true if the file is accessible at the server. */
|
* but with plugins like the libcurl based one it will return true if the file is accessible at the server. */
|
||||||
virtual bool fileExists(const std::string& filename, const Options* options) const;
|
virtual bool fileExists(const std::string& filename, const Options* options) const;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer
|
requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer
|
||||||
to a specified x,y location on the window. This is used by some camera manipulators
|
to a specified x,y location on the window. This is used by some camera manipulators
|
||||||
to initialise the mouse pointer when mouse position relative to a controls
|
to initialise the mouse pointer when mouse position relative to a controls
|
||||||
neutral mouse position is required, i.e when mimicking a aircrafts joystick.
|
neutral mouse position is required, i.e when mimicking an aircraft joystick.
|
||||||
*/
|
*/
|
||||||
virtual void requestWarpPointer(float x,float y) = 0;
|
virtual void requestWarpPointer(float x,float y) = 0;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osgParticle
|
|||||||
{
|
{
|
||||||
|
|
||||||
/** ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects
|
/** ConnectConnectedParticleSystem is a specialise ConnectedParticleSystem for effects
|
||||||
* like missle trails, where the individual particles are rendered as
|
* like missile trails, where the individual particles are rendered as
|
||||||
* single ribbon.
|
* single ribbon.
|
||||||
*/
|
*/
|
||||||
class OSGPARTICLE_EXPORT ConnectedParticleSystem: public osgParticle::ParticleSystem
|
class OSGPARTICLE_EXPORT ConnectedParticleSystem: public osgParticle::ParticleSystem
|
||||||
|
@ -78,13 +78,13 @@ virtual ViewDependentShadowTechnique::ViewData * initViewDependentData \
|
|||||||
unique CullVisitor used to cull the scene in every frame.
|
unique CullVisitor used to cull the scene in every frame.
|
||||||
|
|
||||||
Based on CullVisitor ptr passed to cull method, associated Technique::ViewData
|
Based on CullVisitor ptr passed to cull method, associated Technique::ViewData
|
||||||
object is created (if neccessary) and then seleced. Then control is passed to
|
object is created (if necessary) and then seleced. Then control is passed to
|
||||||
this ViewData object. So, each view has its associated unique ViewData
|
this ViewData object. So, each view has its associated unique ViewData
|
||||||
(or derived) object performing dirty work of shadow resources management and
|
(or derived) object performing dirty work of shadow resources management and
|
||||||
shadow generation for the view.
|
shadow generation for the view.
|
||||||
|
|
||||||
To support creation of classes derived from ViewDependentShadowTechnique it
|
To support creation of classes derived from ViewDependentShadowTechnique it
|
||||||
was neccessary to provide mechanism to override ViewData and allow for
|
was necessary to provide mechanism to override ViewData and allow for
|
||||||
initialization of new derived ViewData objects. Creation and initialization
|
initialization of new derived ViewData objects. Creation and initialization
|
||||||
is performed when ViewDependendentShadowTechnique::cull gets called with
|
is performed when ViewDependendentShadowTechnique::cull gets called with
|
||||||
CullVistor ptr which does not yet have associated ViewData object. When it
|
CullVistor ptr which does not yet have associated ViewData object. When it
|
||||||
|
@ -149,7 +149,7 @@ class OSGTERRAIN_EXPORT TerrainTile : public osg::Group
|
|||||||
bool getRequiresNormals() const { return _requiresNormals; }
|
bool getRequiresNormals() const { return _requiresNormals; }
|
||||||
|
|
||||||
|
|
||||||
/** Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neigbours to valid entries with the default value.*/
|
/** Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neighbours to valid entries with the default value.*/
|
||||||
void setTreatBoundariesToValidDataAsDefaultValue(bool flag) { _treatBoundariesToValidDataAsDefaultValue = flag; }
|
void setTreatBoundariesToValidDataAsDefaultValue(bool flag) { _treatBoundariesToValidDataAsDefaultValue = flag; }
|
||||||
|
|
||||||
/** Get whether the TeatBoundariesToValidDataAsDefaultValue hint.*/
|
/** Get whether the TeatBoundariesToValidDataAsDefaultValue hint.*/
|
||||||
|
@ -272,7 +272,7 @@ public:
|
|||||||
/** Resize any per context GLObject buffers to specified size. */
|
/** Resize any per context GLObject buffers to specified size. */
|
||||||
virtual void resizeGLObjectBuffers(unsigned int maxSize);
|
virtual void resizeGLObjectBuffers(unsigned int maxSize);
|
||||||
|
|
||||||
/** create an image that maps all the associated Glyph's onto a single image, that is equivilant to what will be downloaded to the texture.*/
|
/** create an image that maps all the associated Glyph's onto a single image, that is equivalent to what will be downloaded to the texture.*/
|
||||||
osg::Image* createImage();
|
osg::Image* createImage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
const GraphicsSubgraphMap& getGraphicsSubgraphMap() const { return _graphicsSubgraphMap; }
|
const GraphicsSubgraphMap& getGraphicsSubgraphMap() const { return _graphicsSubgraphMap; }
|
||||||
|
|
||||||
/** Set the WidgetStateSet is used internally by Widgets to manage state that decorates the subgraph.
|
/** Set the WidgetStateSet is used internally by Widgets to manage state that decorates the subgraph.
|
||||||
* WidgetStateSet is not serialized and is typically populated by teh Widget::createGraphics() implementation,
|
* WidgetStateSet is not serialized and is typically populated by the Widget::createGraphics() implementation,
|
||||||
* end users will not normally touoch the WidgetStateSet, use the normal Node::setStateSet() if you want to apply
|
* end users will not normally touoch the WidgetStateSet, use the normal Node::setStateSet() if you want to apply
|
||||||
* your own state to the Widget and it's subgraphs.*/
|
* your own state to the Widget and it's subgraphs.*/
|
||||||
void setWidgetStateSet(osg::StateSet* stateset) { _widgetStateSet = stateset; }
|
void setWidgetStateSet(osg::StateSet* stateset) { _widgetStateSet = stateset; }
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
namespace osgUtil {
|
namespace osgUtil {
|
||||||
|
|
||||||
/** A class for assisting the building ascene graphs that is equivilant to OpenGL 1.0 style calls.
|
/** A class for assisting the building a scene graph that is equivilant to OpenGL 1.0 style calls.
|
||||||
*/
|
*/
|
||||||
class OSGUTIL_EXPORT SceneGraphBuilder
|
class OSGUTIL_EXPORT SceneGraphBuilder
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace osgWidget {
|
|||||||
class Window;
|
class Window;
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
|
|
||||||
// A Widget is a rectangular region that recieves events about the state of various input
|
// A Widget is a rectangular region that receives events about the state of various input
|
||||||
// devices such as the pointer and keyboard. It is aware of it's width, height, and origin but
|
// devices such as the pointer and keyboard. It is aware of it's width, height, and origin but
|
||||||
// nothing else. It is the job of higher-level container objects to organize layouts and
|
// nothing else. It is the job of higher-level container objects to organize layouts and
|
||||||
// the like, and to contextualize the meaning of the widgets "origin" (whether it is absolute
|
// the like, and to contextualize the meaning of the widgets "origin" (whether it is absolute
|
||||||
@ -468,7 +468,7 @@ public:
|
|||||||
point_type _padTop;
|
point_type _padTop;
|
||||||
point_type _padBottom;
|
point_type _padBottom;
|
||||||
|
|
||||||
// The alignments are used in conjuction when the widget is NOT set to fill.
|
// The alignments are used in conjunction when the widget is NOT set to fill.
|
||||||
VerticalAlignment _valign;
|
VerticalAlignment _valign;
|
||||||
HorizontalAlignment _halign;
|
HorizontalAlignment _halign;
|
||||||
|
|
||||||
|
@ -75,13 +75,13 @@ Barrier::Barrier(int numThreads) {
|
|||||||
//
|
//
|
||||||
// PRIO_INHERIT causes any thread locking the mutex to temporarily become
|
// PRIO_INHERIT causes any thread locking the mutex to temporarily become
|
||||||
// the same priority as the highest thread also blocked on the mutex.
|
// the same priority as the highest thread also blocked on the mutex.
|
||||||
// Although more expensive, this is the prefered method.
|
// Although more expensive, this is the preferred method.
|
||||||
//
|
//
|
||||||
// PRIO_PROTECT causes any thread locking the mutex to assume the priority
|
// PRIO_PROTECT causes any thread locking the mutex to assume the priority
|
||||||
// specified by setprioceiling. pthread_mutex_lock will fail if
|
// specified by setprioceiling. pthread_mutex_lock will fail if
|
||||||
// the priority ceiling is lower than the thread's priority. Therefore,
|
// the priority ceiling is lower than the thread's priority. Therefore,
|
||||||
// the priority ceiling must be set to the max priority in order to
|
// the priority ceiling must be set to the max priority in order to
|
||||||
// garantee no deadlocks will occur.
|
// guarantee no deadlocks will occur.
|
||||||
//
|
//
|
||||||
#if defined (_POSIX_THREAD_PRIO_INHERIT) || defined (_POSIX_THREAD_PRIO_PROTECT) // [
|
#if defined (_POSIX_THREAD_PRIO_INHERIT) || defined (_POSIX_THREAD_PRIO_PROTECT) // [
|
||||||
|
|
||||||
|
@ -64,13 +64,13 @@ Mutex::Mutex(MutexType type):
|
|||||||
//
|
//
|
||||||
// PRIO_INHERIT causes any thread locking the mutex to temporarily become
|
// PRIO_INHERIT causes any thread locking the mutex to temporarily become
|
||||||
// the same priority as the highest thread also blocked on the mutex.
|
// the same priority as the highest thread also blocked on the mutex.
|
||||||
// Although more expensive, this is the prefered method.
|
// Although more expensive, this is the preferred method.
|
||||||
//
|
//
|
||||||
// PRIO_PROTECT causes any thread locking the mutex to assume the priority
|
// PRIO_PROTECT causes any thread locking the mutex to assume the priority
|
||||||
// specified by setprioceiling. pthread_mutex_lock will fail if
|
// specified by setprioceiling. pthread_mutex_lock will fail if
|
||||||
// the priority ceiling is lower than the thread's priority. Therefore,
|
// the priority ceiling is lower than the thread's priority. Therefore,
|
||||||
// the priority ceiling must be set to the max priority in order to
|
// the priority ceiling must be set to the max priority in order to
|
||||||
// garantee no deadlocks will occur.
|
// guarantee no deadlocks will occur.
|
||||||
//
|
//
|
||||||
#if defined (_POSIX_THREAD_PRIO_INHERIT) || defined (_POSIX_THREAD_PRIO_PROTECT) // [
|
#if defined (_POSIX_THREAD_PRIO_INHERIT) || defined (_POSIX_THREAD_PRIO_PROTECT) // [
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ namespace OpenThreads {
|
|||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// Set thread scheduling parameters.
|
// Set thread scheduling parameters.
|
||||||
// Note that time-critical priority is ommited :
|
// Note that time-critical priority is omitted :
|
||||||
// 1) It's not sensible thing to do
|
// 1) It's not sensible thing to do
|
||||||
// 2) there's no enum for that in Thread interface
|
// 2) there's no enum for that in Thread interface
|
||||||
// Also, on Windows, effective thread priority is :
|
// Also, on Windows, effective thread priority is :
|
||||||
|
@ -347,7 +347,7 @@ bool clearImageToColor(osg::Image* image, const osg::Vec4& colour)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Search through the list of Images and find the maximum number of components used amoung the images.*/
|
/** Search through the list of Images and find the maximum number of components used among the images.*/
|
||||||
unsigned int maximimNumOfComponents(const ImageList& imageList)
|
unsigned int maximimNumOfComponents(const ImageList& imageList)
|
||||||
{
|
{
|
||||||
unsigned int max_components = 0;
|
unsigned int max_components = 0;
|
||||||
|
@ -338,7 +338,7 @@ void Sequence::traverse(NodeVisitor& nv)
|
|||||||
int loops = (int)(deltaT/adjTotalTime);
|
int loops = (int)(deltaT/adjTotalTime);
|
||||||
|
|
||||||
|
|
||||||
// adjust reps & quick check to see if done becuase reps used up
|
// adjust reps & quick check to see if done because reps used up
|
||||||
|
|
||||||
if (_nreps>0)
|
if (_nreps>0)
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,7 @@ bool ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const Convex
|
|||||||
// then push to coords to far plane by setting its coord to c[i].z = -1.
|
// then push to coords to far plane by setting its coord to c[i].z = -1.
|
||||||
// then transform far plane polygon back into projection space, by p[i]*inv(P)
|
// then transform far plane polygon back into projection space, by p[i]*inv(P)
|
||||||
// compute orientation of front plane, if normal.z()<0 then facing away from eye pont, so reverse the polygons, or simply invert planes.
|
// compute orientation of front plane, if normal.z()<0 then facing away from eye pont, so reverse the polygons, or simply invert planes.
|
||||||
// compute volume (quality) betwen front polygon in projection space and back polygon in projection space.
|
// compute volume (quality) between front polygon in projection space and back polygon in projection space.
|
||||||
|
|
||||||
|
|
||||||
const VertexList& vertices_in = occluder.getOccluder().getVertexList();
|
const VertexList& vertices_in = occluder.getOccluder().getVertexList();
|
||||||
|
@ -120,7 +120,7 @@ void TexGen::apply(State&) const
|
|||||||
else // SPHERE_MAP
|
else // SPHERE_MAP
|
||||||
{
|
{
|
||||||
// Also don't set the mode of GL_R & GL_Q as these will generate
|
// Also don't set the mode of GL_R & GL_Q as these will generate
|
||||||
// GL_INVALID_ENUM (See OpenGL Refrence Guide, glTexGEn.)
|
// GL_INVALID_ENUM (See OpenGL Reference Guide, glTexGEn.)
|
||||||
|
|
||||||
glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, _mode );
|
glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, _mode );
|
||||||
glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, _mode );
|
glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, _mode );
|
||||||
|
@ -367,7 +367,7 @@ void Texture2DArray::apply(State& state) const
|
|||||||
|
|
||||||
// For certain we have to manually allocate memory for mipmaps if images are compressed
|
// For certain we have to manually allocate memory for mipmaps if images are compressed
|
||||||
// if not allocated OpenGL will produce errors on mipmap upload.
|
// if not allocated OpenGL will produce errors on mipmap upload.
|
||||||
// I have not tested if this is neccessary for plain texture formats but
|
// I have not tested if this is necessary for plain texture formats but
|
||||||
// common sense suggests its required as well.
|
// common sense suggests its required as well.
|
||||||
if( _min_filter != LINEAR && _min_filter != NEAREST && _images[0]->isMipmap() )
|
if( _min_filter != LINEAR && _min_filter != NEAREST && _images[0]->isMipmap() )
|
||||||
{
|
{
|
||||||
@ -630,7 +630,7 @@ void Texture2DArray::copyTexSubImage2DArray(State& state, int xoffset, int yoffs
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OSG_WARN<<"Warning: Texture2DArray::copyTexSubImage2DArray(..) failed, cannot not copy to a non existant texture."<<std::endl;
|
OSG_WARN<<"Warning: Texture2DArray::copyTexSubImage2DArray(..) failed, cannot not copy to a non existent texture."<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -505,7 +505,7 @@ void Texture3D::copyTexSubImage3D(State& state, int xoffset, int yoffset, int zo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OSG_WARN<<"Warning: Texture3D::copyTexSubImage3D(..) failed, cannot not copy to a non existant texture."<<std::endl;
|
OSG_WARN<<"Warning: Texture3D::copyTexSubImage3D(..) failed, cannot not copy to a non existent texture."<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ void TextureCubeMap::copyTexSubImageCubeMap(State& state, int face, int xoffset,
|
|||||||
if (!textureObject)
|
if (!textureObject)
|
||||||
{
|
{
|
||||||
// failed to create texture object
|
// failed to create texture object
|
||||||
OSG_NOTICE<<"Warning : failed to create TextureCubeMap texture obeject, copyTexSubImageCubeMap abondoned."<<std::endl;
|
OSG_NOTICE<<"Warning : failed to create TextureCubeMap texture obeject, copyTexSubImageCubeMap abandoned."<<std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1298,7 +1298,7 @@ Uniform::Uniform( const char* name, bool b0, bool b1, bool b2, bool b3 ) :
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// Value assignment for single-element (ie: non-array) uniforms.
|
// Value assignment for single-element (ie: non-array) uniforms.
|
||||||
// (For backwards compatability, if not already configured, set the
|
// (For backwards compatibility, if not already configured, set the
|
||||||
// Uniform's _numElements=1)
|
// Uniform's _numElements=1)
|
||||||
|
|
||||||
bool Uniform::set( float f )
|
bool Uniform::set( float f )
|
||||||
|
@ -24,7 +24,7 @@ osg::BoundingBox RigComputeBoundingBoxCallback::computeBound(const osg::Drawable
|
|||||||
{
|
{
|
||||||
const osgAnimation::RigGeometry& rig = dynamic_cast<const osgAnimation::RigGeometry&>(drawable);
|
const osgAnimation::RigGeometry& rig = dynamic_cast<const osgAnimation::RigGeometry&>(drawable);
|
||||||
|
|
||||||
// if a valid inital bounding box is set we use it without asking more
|
// if a valid initial bounding box is set we use it without asking more
|
||||||
if (rig.getInitialBound().valid())
|
if (rig.getInitialBound().valid())
|
||||||
return rig.getInitialBound();
|
return rig.getInitialBound();
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ DynamicLibrary::HANDLE DynamicLibrary::getLibraryHandle( const std::string& libr
|
|||||||
NSDestroyObjectFileImage(image);
|
NSDestroyObjectFileImage(image);
|
||||||
}
|
}
|
||||||
#elif defined(__hpux)
|
#elif defined(__hpux)
|
||||||
// BIND_FIRST is neccessary for some reason
|
// BIND_FIRST is necessary for some reason
|
||||||
handle = shl_load ( libraryName.c_str(), BIND_DEFERRED|BIND_FIRST|BIND_VERBOSE, 0);
|
handle = shl_load ( libraryName.c_str(), BIND_DEFERRED|BIND_FIRST|BIND_VERBOSE, 0);
|
||||||
return handle;
|
return handle;
|
||||||
#else // other unix
|
#else // other unix
|
||||||
|
@ -152,7 +152,7 @@ std::string osgDB::getNameLessExtension(const std::string& fileName)
|
|||||||
// strip all extensions from the filename.
|
// strip all extensions from the filename.
|
||||||
std::string osgDB::getNameLessAllExtensions(const std::string& fileName)
|
std::string osgDB::getNameLessAllExtensions(const std::string& fileName)
|
||||||
{
|
{
|
||||||
// Finds start serach position: from last slash, or the begining of the string if none found
|
// Finds start serach position: from last slash, or the beginning of the string if none found
|
||||||
std::string::size_type startPos = fileName.find_last_of(PATH_SEPARATORS); // Finds forward slash *or* back slash
|
std::string::size_type startPos = fileName.find_last_of(PATH_SEPARATORS); // Finds forward slash *or* back slash
|
||||||
if (startPos == std::string::npos) startPos = 0;
|
if (startPos == std::string::npos) startPos = 0;
|
||||||
std::string::size_type dot = fileName.find_first_of('.', startPos); // Finds *FIRST* dot from start pos
|
std::string::size_type dot = fileName.find_first_of('.', startPos); // Finds *FIRST* dot from start pos
|
||||||
|
@ -964,7 +964,7 @@ bool osgDB::containsCurrentWorkingDirectoryReference(const FilePathList& paths)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The Cocoa version is about 10 lines of code.
|
// The Cocoa version is about 10 lines of code.
|
||||||
// The Carbon version is noticably longer.
|
// The Carbon version is noticeably longer.
|
||||||
// Unfortunately, the Cocoa version requires -lobjc to be
|
// Unfortunately, the Cocoa version requires -lobjc to be
|
||||||
// linked in when creating an executable.
|
// linked in when creating an executable.
|
||||||
// Rumor is that this will be done autmatically in gcc 3.5/Tiger,
|
// Rumor is that this will be done autmatically in gcc 3.5/Tiger,
|
||||||
|
@ -854,7 +854,7 @@ ReaderWriter* Registry::getReaderWriterForExtension(const std::string& ext)
|
|||||||
|
|
||||||
OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(_pluginMutex);
|
OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(_pluginMutex);
|
||||||
|
|
||||||
// first attemt one of the installed loaders
|
// first attempt one of the installed loaders
|
||||||
for(ReaderWriterList::iterator itr=_rwList.begin();
|
for(ReaderWriterList::iterator itr=_rwList.begin();
|
||||||
itr!=_rwList.end();
|
itr!=_rwList.end();
|
||||||
++itr)
|
++itr)
|
||||||
|
@ -210,12 +210,12 @@ bool XmlNode::read(Input& input)
|
|||||||
commentNode->contents = input.substr(0, end);
|
commentNode->contents = input.substr(0, end);
|
||||||
if (end!=std::string::npos)
|
if (end!=std::string::npos)
|
||||||
{
|
{
|
||||||
OSG_INFO<<"Valid infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_INFO<<"Valid information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += (end+2);
|
input += (end+2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Error: Unclosed infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_NOTICE<<"Error: Unclosed information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += end;
|
input += end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,12 +230,12 @@ bool XmlNode::read(Input& input)
|
|||||||
commentNode->contents = input.substr(0, end);
|
commentNode->contents = input.substr(0, end);
|
||||||
if (end!=std::string::npos)
|
if (end!=std::string::npos)
|
||||||
{
|
{
|
||||||
OSG_INFO<<"Valid infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_INFO<<"Valid information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += (end+2);
|
input += (end+2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Error: Unclosed infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_NOTICE<<"Error: Unclosed information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += end;
|
input += end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,12 +250,12 @@ bool XmlNode::read(Input& input)
|
|||||||
commentNode->contents = input.substr(0, end);
|
commentNode->contents = input.substr(0, end);
|
||||||
if (end!=std::string::npos)
|
if (end!=std::string::npos)
|
||||||
{
|
{
|
||||||
OSG_INFO<<"Valid infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_INFO<<"Valid information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += (end+2);
|
input += (end+2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Error: Unclosed infomation record ["<<commentNode->contents<<"]"<<std::endl;
|
OSG_NOTICE<<"Error: Unclosed information record ["<<commentNode->contents<<"]"<<std::endl;
|
||||||
input += end;
|
input += end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ void Dragger::setHandleEvents(bool flag)
|
|||||||
|
|
||||||
_handleEvents = flag;
|
_handleEvents = flag;
|
||||||
|
|
||||||
// update the number of children that require an event traversal to make sure this dragger recieves events.
|
// update the number of children that require an event traversal to make sure this dragger receives events.
|
||||||
if (_handleEvents) setNumChildrenRequiringEventTraversal(getNumChildrenRequiringEventTraversal()+1);
|
if (_handleEvents) setNumChildrenRequiringEventTraversal(getNumChildrenRequiringEventTraversal()+1);
|
||||||
else if (getNumChildrenRequiringEventTraversal()>=1) setNumChildrenRequiringEventTraversal(getNumChildrenRequiringEventTraversal()-1);
|
else if (getNumChildrenRequiringEventTraversal()>=1) setNumChildrenRequiringEventTraversal(getNumChildrenRequiringEventTraversal()-1);
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,7 @@ osg::Node* ReaderWriter3DS::ReaderObject::processNode(StateSetMap& drawStateMap,
|
|||||||
Lib3dsMesh * mesh = lib3ds_file_mesh_for_node(f,node);
|
Lib3dsMesh * mesh = lib3ds_file_mesh_for_node(f,node);
|
||||||
assert(!(mesh && !object)); // Node must be a LIB3DS_NODE_MESH_INSTANCE if a mesh exists
|
assert(!(mesh && !object)); // Node must be a LIB3DS_NODE_MESH_INSTANCE if a mesh exists
|
||||||
|
|
||||||
// Retreive LOCAL transform
|
// Retrieve LOCAL transform
|
||||||
static const osg::Matrix::value_type MATRIX_EPSILON = 1e-10;
|
static const osg::Matrix::value_type MATRIX_EPSILON = 1e-10;
|
||||||
osg::Matrix osgWorldToNodeMatrix( copyLib3dsMatrixToOsgMatrix(node->matrix) );
|
osg::Matrix osgWorldToNodeMatrix( copyLib3dsMatrixToOsgMatrix(node->matrix) );
|
||||||
osg::Matrix osgWorldToParentNodeMatrix;
|
osg::Matrix osgWorldToParentNodeMatrix;
|
||||||
@ -624,7 +624,7 @@ osg::Node* ReaderWriter3DS::ReaderObject::processNode(StateSetMap& drawStateMap,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// didnt use group for children, return a ptr directly to the Geode for this mesh
|
// didn't use group for children, return a ptr directly to the Geode for this mesh
|
||||||
// there is no group node but may have a meshTransform node to hold the meshes matrix
|
// there is no group node but may have a meshTransform node to hold the meshes matrix
|
||||||
if (meshTransform) {
|
if (meshTransform) {
|
||||||
processMesh(drawStateMap,meshTransform,mesh,meshAppliedMatPtr);
|
processMesh(drawStateMap,meshTransform,mesh,meshAppliedMatPtr);
|
||||||
@ -900,7 +900,7 @@ bool isNumber(float x)
|
|||||||
not required, we must split the vertex if a different normal is required.
|
not required, we must split the vertex if a different normal is required.
|
||||||
For example if we are processing a cube mesh with no smoothing group
|
For example if we are processing a cube mesh with no smoothing group
|
||||||
made from 12 triangles and 8 vertices, the resultant mesh should have
|
made from 12 triangles and 8 vertices, the resultant mesh should have
|
||||||
24 vertices to accomodate the 3 different normals at each vertex.
|
24 vertices to accommodate the 3 different normals at each vertex.
|
||||||
*/
|
*/
|
||||||
static void addVertex(
|
static void addVertex(
|
||||||
const Lib3dsMesh* mesh,
|
const Lib3dsMesh* mesh,
|
||||||
|
@ -1652,7 +1652,7 @@ ConvertFromInventor::getStateSet(SoCallbackAction* action)
|
|||||||
|
|
||||||
stateSet->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON);
|
stateSet->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON);
|
||||||
|
|
||||||
// propogate name
|
// propagate name
|
||||||
if(texture.valid())
|
if(texture.valid())
|
||||||
{
|
{
|
||||||
std::string name = texture->getName();
|
std::string name = texture->getName();
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// SGI Inventor , or TGS Inventor.
|
// SGI Inventor , or TGS Inventor.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Autor: PCJohn (peciva _at fit.vutbr.cz)
|
// Author: PCJohn (peciva _at fit.vutbr.cz)
|
||||||
//
|
//
|
||||||
// License: public domain
|
// License: public domain
|
||||||
//
|
//
|
||||||
@ -1009,7 +1009,7 @@ ConvertToInventor::InventorState* ConvertToInventor::createInventorState(const o
|
|||||||
// just SoMaterial::transparency, SoTexture2 with alpha channel carry transparency information
|
// just SoMaterial::transparency, SoTexture2 with alpha channel carry transparency information
|
||||||
// that is controlled by SoGLRenderAction::transparency type that is set to SCREEN_DOOR by default
|
// that is controlled by SoGLRenderAction::transparency type that is set to SCREEN_DOOR by default
|
||||||
// (dither pattern). So, if the user does not select better transparency type, there is no
|
// (dither pattern). So, if the user does not select better transparency type, there is no
|
||||||
// possiblity to control transparency type from file format.
|
// possibility to control transparency type from file format.
|
||||||
//
|
//
|
||||||
// However, SoTransparencyType node was introduced to overcome this historical limitation
|
// However, SoTransparencyType node was introduced to overcome this historical limitation
|
||||||
// because transparency was performance expensive long time ago.
|
// because transparency was performance expensive long time ago.
|
||||||
|
@ -86,7 +86,7 @@ int OSXCoreVideoTexture::compare(const osg::StateAttribute& sa) const {
|
|||||||
int result = compareTexture(rhs);
|
int result = compareTexture(rhs);
|
||||||
if (result!=0) return result;
|
if (result!=0) return result;
|
||||||
|
|
||||||
// compare each paramter in turn against the rhs.
|
// compare each parameter in turn against the rhs.
|
||||||
#if 1
|
#if 1
|
||||||
if (_textureWidth != 0 && rhs._textureWidth != 0)
|
if (_textureWidth != 0 && rhs._textureWidth != 0)
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,7 @@ private:
|
|||||||
std::vector<MaterialData> mMaterials;
|
std::vector<MaterialData> mMaterials;
|
||||||
|
|
||||||
/// Local per model texture attribute cache.
|
/// Local per model texture attribute cache.
|
||||||
/// ... images are usualy cached in the registries object cache
|
/// ... images are usually cached in the registries object cache
|
||||||
typedef std::map<std::string, TextureData> TextureDataMap;
|
typedef std::map<std::string, TextureData> TextureDataMap;
|
||||||
TextureDataMap mTextureStates;
|
TextureDataMap mTextureStates;
|
||||||
/// A common shared TexEnv set to modulate
|
/// A common shared TexEnv set to modulate
|
||||||
|
@ -98,7 +98,7 @@ int OSXAVFoundationCoreVideoTexture::compare(const osg::StateAttribute& sa) cons
|
|||||||
int result = compareTexture(rhs);
|
int result = compareTexture(rhs);
|
||||||
if (result!=0) return result;
|
if (result!=0) return result;
|
||||||
|
|
||||||
// compare each paramter in turn against the rhs.
|
// compare each parameter in turn against the rhs.
|
||||||
#if 1
|
#if 1
|
||||||
if (_textureWidth != 0 && rhs._textureWidth != 0)
|
if (_textureWidth != 0 && rhs._textureWidth != 0)
|
||||||
{
|
{
|
||||||
|
@ -654,7 +654,7 @@ VisualInfo *VisualChooser::choose( Display *dpy, int screen, bool strict_adheren
|
|||||||
vid = ChoosePixelFormat(*dpy, &pfd);
|
vid = ChoosePixelFormat(*dpy, &pfd);
|
||||||
if ( vid != 0 )
|
if ( vid != 0 )
|
||||||
{
|
{
|
||||||
// Is this additional check neccessary ?
|
// Is this additional check necessary ?
|
||||||
// Did anyone encountered a situation where
|
// Did anyone encountered a situation where
|
||||||
// ChoosePixelFormat returned PXIELFORMAT worse than required ?
|
// ChoosePixelFormat returned PXIELFORMAT worse than required ?
|
||||||
_visual_id = static_cast<unsigned int>(vid);
|
_visual_id = static_cast<unsigned int>(vid);
|
||||||
|
@ -517,8 +517,8 @@ osgDB::ReaderWriter::ReadResult ReaderWriterCURL::readFile(ObjectType objectType
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if user has explictly specified curl then we don't about at this point,
|
// if user has explicitly specified curl then we don't about at this point,
|
||||||
// instead assume the curl can read it any way, if it doesn't explictly
|
// instead assume the curl can read it any way, if it doesn't explicitly
|
||||||
// specify curl then we assume that the file is a local file and not appropriate
|
// specify curl then we assume that the file is a local file and not appropriate
|
||||||
// for the curl plugin to load.
|
// for the curl plugin to load.
|
||||||
if (!curl_ext) return ReadResult::FILE_NOT_HANDLED;
|
if (!curl_ext) return ReadResult::FILE_NOT_HANDLED;
|
||||||
|
@ -267,7 +267,7 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
|
|||||||
|
|
||||||
static void replace(std::string & str, const char from, const std::string & to)
|
static void replace(std::string & str, const char from, const std::string & to)
|
||||||
{
|
{
|
||||||
// Replace for all occurences
|
// Replace for all occurrences
|
||||||
for(std::string::size_type pos=str.find(from); pos!=std::string::npos; pos=str.find(from))
|
for(std::string::size_type pos=str.find(from); pos!=std::string::npos; pos=str.find(from))
|
||||||
{
|
{
|
||||||
str.replace(pos, 1, to);
|
str.replace(pos, 1, to);
|
||||||
@ -276,7 +276,7 @@ static void replace(std::string & str, const char from, const std::string & to)
|
|||||||
|
|
||||||
static void replace(std::string & str, const std::string & from, const std::string & to)
|
static void replace(std::string & str, const std::string & from, const std::string & to)
|
||||||
{
|
{
|
||||||
// Replace for all occurences
|
// Replace for all occurrences
|
||||||
std::size_t lenFrom = from.size();
|
std::size_t lenFrom = from.size();
|
||||||
std::size_t lenTo = to.size();
|
std::size_t lenTo = to.size();
|
||||||
for(std::string::size_type pos=str.find(from); pos!=std::string::npos; pos = str.find(from, pos+lenTo))
|
for(std::string::size_type pos=str.find(from); pos!=std::string::npos; pos = str.find(from, pos+lenTo))
|
||||||
|
@ -279,7 +279,7 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi
|
|||||||
pOsgMorphGeometry->setWeight(j, weights.get(j));
|
pOsgMorphGeometry->setWeight(j, weights.get(j));
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if morph weights are targetted by animations
|
// See if morph weights are targeted by animations
|
||||||
daeElementDomChannelMap::iterator iter = _daeElementDomChannelMap.find(pDomSource);
|
daeElementDomChannelMap::iterator iter = _daeElementDomChannelMap.find(pDomSource);
|
||||||
if (iter != _daeElementDomChannelMap.end())
|
if (iter != _daeElementDomChannelMap.end())
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc )
|
|||||||
{
|
{
|
||||||
// Diffuse texture will defeat specular highlighting
|
// Diffuse texture will defeat specular highlighting
|
||||||
// So postpone specular - Not sure if I should do this here
|
// So postpone specular - Not sure if I should do this here
|
||||||
// beacuse it will override any global light model states
|
// because it will override any global light model states
|
||||||
osg::LightModel* lightmodel = new osg::LightModel;
|
osg::LightModel* lightmodel = new osg::LightModel;
|
||||||
lightmodel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR);
|
lightmodel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR);
|
||||||
ss->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
ss->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
||||||
@ -462,7 +462,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc )
|
|||||||
{
|
{
|
||||||
// Diffuse texture will defeat specular highlighting
|
// Diffuse texture will defeat specular highlighting
|
||||||
// So postpone specular - Not sure if I should do this here
|
// So postpone specular - Not sure if I should do this here
|
||||||
// beacuse it will override any global light model states
|
// because it will override any global light model states
|
||||||
osg::LightModel* lightmodel = new osg::LightModel;
|
osg::LightModel* lightmodel = new osg::LightModel;
|
||||||
lightmodel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR);
|
lightmodel->setColorControl(osg::LightModel::SEPARATE_SPECULAR_COLOR);
|
||||||
ss->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
ss->setAttributeAndModes(lightmodel, osg::StateAttribute::ON);
|
||||||
|
@ -152,7 +152,7 @@ bool daeReader::processDocument( const std::string& fileURI)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build a map of elements that are targetted by animations
|
// Build a map of elements that are targeted by animations
|
||||||
count = database->getElementCount(NULL, COLLADA_TYPE_CHANNEL, NULL);
|
count = database->getElementCount(NULL, COLLADA_TYPE_CHANNEL, NULL);
|
||||||
for (int i=0; i<count; i++)
|
for (int i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
|
@ -440,7 +440,7 @@ osg::Image* ReadDDSFile(std::istream& _istream, bool flipDDSRead)
|
|||||||
depth = ddsd.dwDepth;
|
depth = ddsd.dwDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retreive image properties.
|
// Retrieve image properties.
|
||||||
int s = ddsd.dwWidth;
|
int s = ddsd.dwWidth;
|
||||||
int t = ddsd.dwHeight;
|
int t = ddsd.dwHeight;
|
||||||
int r = depth;
|
int r = depth;
|
||||||
|
@ -1918,7 +1918,7 @@ void DirectShowImageStream::stop()
|
|||||||
|
|
||||||
if (!_renderer->StopFilters())
|
if (!_renderer->StopFilters())
|
||||||
{
|
{
|
||||||
OSG_WARN << this << " cant stop filters" << std::endl;
|
OSG_WARN << this << " can't stop filters" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
_renderer->releaseRessources();
|
_renderer->releaseRessources();
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/** writes all values of an array out to a stream, applies a matrix beforehand if necessary */
|
/** writes all values of an array out to a stream, applies a matrix beforehand if necessary */
|
||||||
|
|
||||||
// I think this is a bit over the top for just a simple vertex array - but if anyone knwos different?
|
// I think this is a bit over the top for just a simple vertex array - but if anyone knows different?
|
||||||
/*
|
/*
|
||||||
class ValueVisitor : public osg::ValueVisitor {
|
class ValueVisitor : public osg::ValueVisitor {
|
||||||
public:
|
public:
|
||||||
|
@ -301,7 +301,7 @@ void FFmpegDecoderAudio::run()
|
|||||||
|
|
||||||
void FFmpegDecoderAudio::setAudioSink(osg::ref_ptr<osg::AudioSink> audio_sink)
|
void FFmpegDecoderAudio::setAudioSink(osg::ref_ptr<osg::AudioSink> audio_sink)
|
||||||
{
|
{
|
||||||
// The FFmpegDecoderAudio object takes the responsability of destroying the audio_sink.
|
// The FFmpegDecoderAudio object takes the responsibility of destroying the audio_sink.
|
||||||
OSG_NOTICE<<"Assigning "<<audio_sink<<std::endl;
|
OSG_NOTICE<<"Assigning "<<audio_sink<<std::endl;
|
||||||
m_audio_sink = audio_sink;
|
m_audio_sink = audio_sink;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Ported into the OSG as a plugin, Robert Osfield Decemeber 2000.
|
* Ported into the OSG as a plugin, Robert Osfield Decemeber 2000.
|
||||||
* Note, reference above to license of simage_rgb is not relevent to the OSG
|
* Note, reference above to license of simage_rgb is not relevant to the OSG
|
||||||
* as the OSG does not use it. Also for patches, bugs and new features
|
* as the OSG does not use it. Also for patches, bugs and new features
|
||||||
* please send them direct to the OSG dev team rather than address above.
|
* please send them direct to the OSG dev team rather than address above.
|
||||||
*
|
*
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
|
|
||||||
supportsOption("enableWireframe[=inline]","create a wireframe geometry for each triangles geometry. The wire geometry will be stored along the solid geometry if 'inline' is specified.");
|
supportsOption("enableWireframe[=inline]","create a wireframe geometry for each triangles geometry. The wire geometry will be stored along the solid geometry if 'inline' is specified.");
|
||||||
supportsOption("generateTangentSpace","Build tangent space to each geometry");
|
supportsOption("generateTangentSpace","Build tangent space to each geometry");
|
||||||
supportsOption("tangentSpaceTextureUnit=<unit>","Specify on wich texture unit normal map is");
|
supportsOption("tangentSpaceTextureUnit=<unit>","Specify on which texture unit normal map is");
|
||||||
supportsOption("triStripCacheSize=<int>","set the cache size when doing tristrip");
|
supportsOption("triStripCacheSize=<int>","set the cache size when doing tristrip");
|
||||||
supportsOption("triStripMinSize=<int>","set the minimum accepted length for a strip");
|
supportsOption("triStripMinSize=<int>","set the minimum accepted length for a strip");
|
||||||
supportsOption("disableMergeTriStrip","disable the merge of all tristrip into one");
|
supportsOption("disableMergeTriStrip","disable the merge of all tristrip into one");
|
||||||
|
@ -44,7 +44,7 @@ void Material::write(DataOutputStream* out){
|
|||||||
out->writeBool(_specularFrontAndBack);
|
out->writeBool(_specularFrontAndBack);
|
||||||
out->writeVec4(_specularFront);
|
out->writeVec4(_specularFront);
|
||||||
out->writeVec4(_specularBack);
|
out->writeVec4(_specularBack);
|
||||||
// Write emmision
|
// Write emission
|
||||||
out->writeBool(_emissionFrontAndBack);
|
out->writeBool(_emissionFrontAndBack);
|
||||||
out->writeVec4(_emissionFront);
|
out->writeVec4(_emissionFront);
|
||||||
out->writeVec4(_emissionBack);
|
out->writeVec4(_emissionBack);
|
||||||
|
@ -78,7 +78,7 @@ int EXIF_Orientation (j_decompress_ptr cinfo)
|
|||||||
0x0002: APP1 length entry = 2 bytes
|
0x0002: APP1 length entry = 2 bytes
|
||||||
0x0004: Exif Identifier entry = 6 bytes
|
0x0004: Exif Identifier entry = 6 bytes
|
||||||
0x000A: Start of TIFF header (Byte order entry) - 4 bytes
|
0x000A: Start of TIFF header (Byte order entry) - 4 bytes
|
||||||
- This is what we look for, to determine endianess.
|
- This is what we look for, to determine endianness.
|
||||||
0x000E: 0th IFD offset pointer - 4 bytes
|
0x000E: 0th IFD offset pointer - 4 bytes
|
||||||
|
|
||||||
exif_marker->data points to the first data after the APP1 marker
|
exif_marker->data points to the first data after the APP1 marker
|
||||||
@ -88,7 +88,7 @@ int EXIF_Orientation (j_decompress_ptr cinfo)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Check for TIFF header and catch endianess */
|
/* Check for TIFF header and catch endianness */
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
for(i=0; i < 16; ++i)
|
for(i=0; i < 16; ++i)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterKTX::readKTXStream(std::istream& fin
|
|||||||
return ReadResult(ReadResult::FILE_NOT_HANDLED);
|
return ReadResult(ReadResult::FILE_NOT_HANDLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
//correct the byte order if the endianess doesn't match
|
//correct the byte order if the endianness doesn't match
|
||||||
if(correctByteOrder(header) == false)
|
if(correctByteOrder(header) == false)
|
||||||
{
|
{
|
||||||
OSG_WARN << "Corrupt KTX header (invalid endianness marker)" << std::endl;
|
OSG_WARN << "Corrupt KTX header (invalid endianness marker)" << std::endl;
|
||||||
|
@ -136,7 +136,7 @@ class ReaderWriterLAS : public osgDB::ReaderWriter
|
|||||||
double mid_y = 0.5*(my.second - my.first);
|
double mid_y = 0.5*(my.second - my.first);
|
||||||
double mid_z = 0.5*(mz.second - mz.first);
|
double mid_z = 0.5*(mz.second - mz.first);
|
||||||
|
|
||||||
// now we do a second pass substracting the mid point to each point
|
// now we do a second pass subtracting the mid point to each point
|
||||||
reader.Reset();
|
reader.Reset();
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
while (reader.ReadNextPoint())
|
while (reader.ReadNextPoint())
|
||||||
|
@ -44,7 +44,7 @@ class Logos: public osg::Drawable
|
|||||||
unsigned int contextID = cv->getState()!=0 ? cv->getState()->getContextID() : 0;
|
unsigned int contextID = cv->getState()!=0 ? cv->getState()->getContextID() : 0;
|
||||||
if(contextID != logos->getContextID())
|
if(contextID != logos->getContextID())
|
||||||
{
|
{
|
||||||
// logo not appropiate for window assigned to the cull visitor so cull it.
|
// logo not appropriate for window assigned to the cull visitor so cull it.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ void Object::parse(const iff::Chunk_list &data)
|
|||||||
|
|
||||||
// FIX FOR A LIGHTWAVE BUG? MAYBE IT IS A FEATURE, I DON'T KNOW...
|
// FIX FOR A LIGHTWAVE BUG? MAYBE IT IS A FEATURE, I DON'T KNOW...
|
||||||
// if the first vertex is at a concave corner, we must invert the winding of the polygon
|
// if the first vertex is at a concave corner, we must invert the winding of the polygon
|
||||||
// beacuse it appears as flipped in Lighwave. Also, we tell the polygon to invert its normal.
|
// because it appears as flipped in Lighwave. Also, we tell the polygon to invert its normal.
|
||||||
// (not implemented yet)
|
// (not implemented yet)
|
||||||
/*if (i->vert.size() >= 4) {
|
/*if (i->vert.size() >= 4) {
|
||||||
if (must_invert_winding == triangle_is_clockwise(current_layer.units().back().points(), i->vert.front().index, i->vert.back().index, i->vert[1].index)) {
|
if (must_invert_winding == triangle_is_clockwise(current_layer.units().back().points(), i->vert.front().index, i->vert.back().index, i->vert[1].index)) {
|
||||||
|
@ -339,7 +339,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string
|
|||||||
|
|
||||||
osgUtil::Tessellator tessellator;
|
osgUtil::Tessellator tessellator;
|
||||||
|
|
||||||
// add everthing into the Geode.
|
// add everything into the Geode.
|
||||||
osgUtil::SmoothingVisitor smoother;
|
osgUtil::SmoothingVisitor smoother;
|
||||||
for(itr=mtgcm.begin();
|
for(itr=mtgcm.begin();
|
||||||
itr!=mtgcm.end();
|
itr!=mtgcm.end();
|
||||||
|
@ -1942,7 +1942,7 @@ char **get_words(FILE *fp, int *nwords, char **orig_line)
|
|||||||
words = (char **) myalloc (sizeof (char *) * max_words);
|
words = (char **) myalloc (sizeof (char *) * max_words);
|
||||||
|
|
||||||
/* convert line-feed and tabs into spaces */
|
/* convert line-feed and tabs into spaces */
|
||||||
/* (this guarentees that there will be a space before the */
|
/* (this guarantees that there will be a space before the */
|
||||||
/* null character at the end of the string) */
|
/* null character at the end of the string) */
|
||||||
|
|
||||||
str[BIG_STRING-2] = ' ';
|
str[BIG_STRING-2] = ' ';
|
||||||
|
@ -266,7 +266,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
|||||||
// Catch the if any exception thrown
|
// Catch the if any exception thrown
|
||||||
catch( exception& e )
|
catch( exception& e )
|
||||||
{
|
{
|
||||||
MESHERROR << "Unable to read PLY file, an exception occured: "
|
MESHERROR << "Unable to read PLY file, an exception occurred: "
|
||||||
<< e.what() << endl;
|
<< e.what() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
|||||||
}
|
}
|
||||||
catch( exception& e )
|
catch( exception& e )
|
||||||
{
|
{
|
||||||
MESHERROR << "Unable to get PLY file description, an exception occured: "
|
MESHERROR << "Unable to get PLY file description, an exception occurred: "
|
||||||
<< e.what() << endl;
|
<< e.what() << endl;
|
||||||
}
|
}
|
||||||
MESHASSERT( props != 0 );
|
MESHASSERT( props != 0 );
|
||||||
@ -386,7 +386,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
|||||||
}
|
}
|
||||||
catch( exception& e )
|
catch( exception& e )
|
||||||
{
|
{
|
||||||
MESHERROR << "Unable to read vertex in PLY file, an exception occured: "
|
MESHERROR << "Unable to read vertex in PLY file, an exception occurred: "
|
||||||
<< e.what() << endl;
|
<< e.what() << endl;
|
||||||
// stop for loop by setting the loop variable to break condition
|
// stop for loop by setting the loop variable to break condition
|
||||||
// this way resources still get released even on error cases
|
// this way resources still get released even on error cases
|
||||||
@ -411,7 +411,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
|||||||
}
|
}
|
||||||
catch( exception& e )
|
catch( exception& e )
|
||||||
{
|
{
|
||||||
MESHERROR << "Unable to read PLY file, an exception occured: "
|
MESHERROR << "Unable to read PLY file, an exception occurred: "
|
||||||
<< e.what() << endl;
|
<< e.what() << endl;
|
||||||
// stop for loop by setting the loop variable to break condition
|
// stop for loop by setting the loop variable to break condition
|
||||||
// this way resources still get released even on error cases
|
// this way resources still get released even on error cases
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// and writes it to the stream.
|
// and writes it to the stream.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Autor: PCJohn (peciva _at fit.vutbr.cz)
|
// Author: PCJohn (peciva _at fit.vutbr.cz)
|
||||||
// developed for research purposes of Cadwork (c) and
|
// developed for research purposes of Cadwork (c) and
|
||||||
// Brno University of Technology (Czech Rep., EU)
|
// Brno University of Technology (Czech Rep., EU)
|
||||||
//
|
//
|
||||||
|
@ -302,7 +302,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not an encoded "live" psuedo file - so check a real file exists
|
// Not an encoded "live" pseudo file - so check a real file exists
|
||||||
// only find the file if it isn't a URL
|
// only find the file if it isn't a URL
|
||||||
std::string fileName = file;
|
std::string fileName = file;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Ported into the OSG as a plugin, Robert Osfield Decemeber 2000.
|
* Ported into the OSG as a plugin, Robert Osfield Decemeber 2000.
|
||||||
* Note, reference above to license of simage_rgb is not relevent to the OSG
|
* Note, reference above to license of simage_rgb is not relevant to the OSG
|
||||||
* as the OSG does not use it. Also for patches, bugs and new features
|
* as the OSG does not use it. Also for patches, bugs and new features
|
||||||
* please send them direct to the OSG dev team rather than address above.
|
* please send them direct to the OSG dev team rather than address above.
|
||||||
*
|
*
|
||||||
|
@ -96,7 +96,7 @@ class ReaderWriterTRANS : public osgDB::ReaderWriter
|
|||||||
public:
|
public:
|
||||||
ReaderWriterTRANS()
|
ReaderWriterTRANS()
|
||||||
{
|
{
|
||||||
supportsExtension(EXTENSION_NAME,"Translation Psuedo loader.");
|
supportsExtension(EXTENSION_NAME,"Translation Pseudo loader.");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* className() const { return "translation pseudo-loader"; }
|
virtual const char* className() const { return "translation pseudo-loader"; }
|
||||||
|
@ -137,7 +137,7 @@ TXFFont::loadFont(std::istream& stream)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read endianess hint
|
// read endianness hint
|
||||||
bool isSwapped = 0x12345678u != readInt(stream, false);
|
bool isSwapped = 0x12345678u != readInt(stream, false);
|
||||||
|
|
||||||
unsigned format = readInt(stream, isSwapped);
|
unsigned format = readInt(stream, isSwapped);
|
||||||
|
@ -25,7 +25,7 @@ void TXPPagedLOD::traverse(osg::NodeVisitor& nv)
|
|||||||
|
|
||||||
//TileMapper* tileMapper = dynamic_cast<TileMapper*>(nv.getUserData());
|
//TileMapper* tileMapper = dynamic_cast<TileMapper*>(nv.getUserData());
|
||||||
//Modified by Brad Anderegg (May-27-08) because the black listing process appears to make tiles switch lods
|
//Modified by Brad Anderegg (May-27-08) because the black listing process appears to make tiles switch lods
|
||||||
//when they clearly shouldnt, in the worst cases a tile will page out that is right in front of you.
|
//when they clearly shouldn't, in the worst cases a tile will page out that is right in front of you.
|
||||||
bool forceUseOfFirstChild = /*tileMapper ? (tileMapper->isNodeBlackListed(this)) :*/ false;
|
bool forceUseOfFirstChild = /*tileMapper ? (tileMapper->isNodeBlackListed(this)) :*/ false;
|
||||||
|
|
||||||
double timeStamp = nv.getFrameStamp()?nv.getFrameStamp()->getReferenceTime():0.0;
|
double timeStamp = nv.getFrameStamp()?nv.getFrameStamp()->getReferenceTime():0.0;
|
||||||
|
@ -181,7 +181,7 @@ bool TileMapper::isTileNeighbourALowerLODLevel(const TileIdentifier& tid, int dx
|
|||||||
// identify whether the tile is a NE/SE/SW/NW tile relative to its parent.
|
// identify whether the tile is a NE/SE/SW/NW tile relative to its parent.
|
||||||
osg::Vec3 delta(tid.x%2,tid.y%2,0);
|
osg::Vec3 delta(tid.x%2,tid.y%2,0);
|
||||||
|
|
||||||
if (delta.y()>0.0f) // noth side
|
if (delta.y()>0.0f) // north side
|
||||||
{
|
{
|
||||||
if (delta.x()>0.0f)
|
if (delta.x()>0.0f)
|
||||||
{
|
{
|
||||||
|
@ -511,7 +511,7 @@ bool trpgGeometry::Write(trpgWriteBuffer &buf)
|
|||||||
|
|
||||||
/* Material info
|
/* Material info
|
||||||
Num materials
|
Num materials
|
||||||
Material indicies
|
Material indices
|
||||||
*/
|
*/
|
||||||
if (materials.size() > 0) {
|
if (materials.size() > 0) {
|
||||||
buf.Begin(TRPG_GEOM_MATERIAL);
|
buf.Begin(TRPG_GEOM_MATERIAL);
|
||||||
|
@ -281,8 +281,8 @@ bool trpgReadBuffer::GetToken(trpgToken &tok,int32 &len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Limit Handling functions
|
/* Limit Handling functions
|
||||||
These impose arbitrary lenght limits on the read buffer.
|
These impose arbitrary length limits on the read buffer.
|
||||||
This keeps us from reading pased a token group and parsing
|
This keeps us from reading passed a token group and parsing
|
||||||
random data within an archive.
|
random data within an archive.
|
||||||
*/
|
*/
|
||||||
// Push Limit
|
// Push Limit
|
||||||
|
@ -1349,7 +1349,7 @@ void trpgwGeomHelper::Optimize()
|
|||||||
vid = 3*triId;
|
vid = 3*triId;
|
||||||
|
|
||||||
if (triId < numTri) {
|
if (triId < numTri) {
|
||||||
// B is the new primary, check it agains the next
|
// B is the new primary, check it against the next
|
||||||
c[0] = optVert(numMat,vid,vert,norm,tex);
|
c[0] = optVert(numMat,vid,vert,norm,tex);
|
||||||
c[1] = optVert(numMat,vid+1,vert,norm,tex);
|
c[1] = optVert(numMat,vid+1,vert,norm,tex);
|
||||||
c[2] = optVert(numMat,vid+2,vert,norm,tex);
|
c[2] = optVert(numMat,vid+2,vert,norm,tex);
|
||||||
|
@ -1375,7 +1375,7 @@ const uInt border[] = { // Order of the bit length code lengths
|
|||||||
// end-of-block. Note however that the static length tree defines
|
// end-of-block. Note however that the static length tree defines
|
||||||
// 288 codes just to fill out the Huffman codes. Codes 286 and 287
|
// 288 codes just to fill out the Huffman codes. Codes 286 and 287
|
||||||
// cannot be used though, since there is no length base or extra bits
|
// cannot be used though, since there is no length base or extra bits
|
||||||
// defined for them. Similarily, there are up to 30 distance codes.
|
// defined for them. Similarly, there are up to 30 distance codes.
|
||||||
// However, static trees define 32 codes (all 5 bits) to fill out the
|
// However, static trees define 32 codes (all 5 bits) to fill out the
|
||||||
// Huffman codes, but the last two had better not show up in the data.
|
// Huffman codes, but the last two had better not show up in the data.
|
||||||
// 7. Unzip can check dynamic Huffman blocks for complete code sets.
|
// 7. Unzip can check dynamic Huffman blocks for complete code sets.
|
||||||
@ -2968,7 +2968,7 @@ int unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len);
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
// Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
||||||
// for end of file.
|
// for end of file.
|
||||||
// IN assertion: the stream s has been sucessfully opened for reading.
|
// IN assertion: the stream s has been successfully opened for reading.
|
||||||
|
|
||||||
int unzlocal_getByte(LUFILE *fin,int *pi)
|
int unzlocal_getByte(LUFILE *fin,int *pi)
|
||||||
{ unsigned char c;
|
{ unsigned char c;
|
||||||
@ -3062,8 +3062,8 @@ int strcmpcasenosensitive_internal (const char* fileName1,const char *fileName2)
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Compare two filename (fileName1,fileName2).
|
// Compare two filename (fileName1,fileName2).
|
||||||
// If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
// If iCaseSenisivity = 1, comparison is case sensitivity (like strcmp)
|
||||||
// If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi or strcasecmp)
|
// If iCaseSenisivity = 2, comparison is not case sensitivity (like strcmpi or strcasecmp)
|
||||||
//
|
//
|
||||||
int unzStringFileNameCompare (const char*fileName1,const char*fileName2,int iCaseSensitivity)
|
int unzStringFileNameCompare (const char*fileName1,const char*fileName2,int iCaseSensitivity)
|
||||||
{ if (iCaseSensitivity==1) return strcmp(fileName1,fileName2);
|
{ if (iCaseSensitivity==1) return strcmp(fileName1,fileName2);
|
||||||
|
@ -125,7 +125,7 @@ void KeyEventHandler::doOperation()
|
|||||||
|
|
||||||
if (commandRunsInBackground)
|
if (commandRunsInBackground)
|
||||||
{
|
{
|
||||||
// Sleep breifly while command runs in background to give it a chance to open
|
// Sleep briefly while command runs in background to give it a chance to open
|
||||||
// a window and obscure this present3D's window avoiding this present3D from
|
// a window and obscure this present3D's window avoiding this present3D from
|
||||||
// rendering anything new before the new window opens.
|
// rendering anything new before the new window opens.
|
||||||
OpenThreads::Thread::microSleep(500000); // half second sleep.
|
OpenThreads::Thread::microSleep(500000); // half second sleep.
|
||||||
|
@ -234,7 +234,7 @@ void PickEventHandler::doOperation()
|
|||||||
|
|
||||||
if (commandRunsInBackground)
|
if (commandRunsInBackground)
|
||||||
{
|
{
|
||||||
// Sleep breifly while command runs in background to give it a chance to open
|
// Sleep briefly while command runs in background to give it a chance to open
|
||||||
// a window and obscure this present3D's window avoiding this present3D from
|
// a window and obscure this present3D's window avoiding this present3D from
|
||||||
// rendering anything new before the new window opens.
|
// rendering anything new before the new window opens.
|
||||||
OpenThreads::Thread::microSleep(500000); // half second sleep.
|
OpenThreads::Thread::microSleep(500000); // half second sleep.
|
||||||
|
@ -1013,7 +1013,7 @@ bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we're holding of the move to next layer to slide, but we need slip the time forward accordingly
|
// we're holding of the move to next layer to slide, but we need slip the time forward accordingly
|
||||||
// componensate for the extra time that this frame is recieving.
|
// componensate for the extra time that this frame is receiving.
|
||||||
_previousTime = time-getCurrentTimeDelayBetweenSlides();
|
_previousTime = time-getCurrentTimeDelayBetweenSlides();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ namespace
|
|||||||
typedef std::vector< double > Distances;
|
typedef std::vector< double > Distances;
|
||||||
typedef std::vector< osg::Vec4d > Points;
|
typedef std::vector< osg::Vec4d > Points;
|
||||||
|
|
||||||
// Auxilliary params contined per face
|
// Auxiliary params continued per face
|
||||||
struct FaceDistances
|
struct FaceDistances
|
||||||
{
|
{
|
||||||
ConvexPolyhedron::Faces::iterator itr;
|
ConvexPolyhedron::Faces::iterator itr;
|
||||||
|
@ -87,7 +87,7 @@ osg::BoundingBox MinimalShadowMap::ViewData::computeShadowReceivingCoarseBounds(
|
|||||||
frustum.cut( box );
|
frustum.cut( box );
|
||||||
|
|
||||||
// approximate sphere with octahedron. Ie first cut by box then
|
// approximate sphere with octahedron. Ie first cut by box then
|
||||||
// additionaly cut with the same box rotated 45, 45, 45 deg.
|
// additionally cut with the same box rotated 45, 45, 45 deg.
|
||||||
box.transform( // rotate box around its center
|
box.transform( // rotate box around its center
|
||||||
osg::Matrix::translate( -bs.center() ) *
|
osg::Matrix::translate( -bs.center() ) *
|
||||||
osg::Matrix::rotate( osg::PI_4, 0, 0, 1 ) *
|
osg::Matrix::rotate( osg::PI_4, 0, 0, 1 ) *
|
||||||
|
@ -296,7 +296,7 @@ void ShadowMap::init()
|
|||||||
// not yet supported !
|
// not yet supported !
|
||||||
|
|
||||||
osg::Image* image = new osg::Image;
|
osg::Image* image = new osg::Image;
|
||||||
// allocate the image data, noPixels x 1 x 1 with 4 rgba floats - equivilant to a Vec4!
|
// allocate the image data, noPixels x 1 x 1 with 4 rgba floats - equivalent to a Vec4!
|
||||||
int noPixels = 1;
|
int noPixels = 1;
|
||||||
image->allocateImage(noPixels,1,1,GL_RGBA,GL_FLOAT);
|
image->allocateImage(noPixels,1,1,GL_RGBA,GL_FLOAT);
|
||||||
image->setInternalTextureFormat(GL_RGBA);
|
image->setInternalTextureFormat(GL_RGBA);
|
||||||
@ -337,7 +337,7 @@ void ShadowMap::cull(osgUtil::CullVisitor& cv)
|
|||||||
|
|
||||||
osgUtil::RenderStage* orig_rs = cv.getRenderStage();
|
osgUtil::RenderStage* orig_rs = cv.getRenderStage();
|
||||||
|
|
||||||
// do traversal of shadow recieving scene which does need to be decorated by the shadow map
|
// do traversal of shadow receiving scene which does need to be decorated by the shadow map
|
||||||
{
|
{
|
||||||
cv.pushStateSet(_stateset.get());
|
cv.pushStateSet(_stateset.get());
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ void StandardShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv
|
|||||||
stateset->setMode( GL_POLYGON_OFFSET_FILL,
|
stateset->setMode( GL_POLYGON_OFFSET_FILL,
|
||||||
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
|
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
|
||||||
|
|
||||||
// agressive optimization
|
// aggressive optimization
|
||||||
stateset->setRenderBinDetails( 0, "RenderBin",
|
stateset->setRenderBinDetails( 0, "RenderBin",
|
||||||
osg::StateSet::OVERRIDE_RENDERBIN_DETAILS );
|
osg::StateSet::OVERRIDE_RENDERBIN_DETAILS );
|
||||||
|
|
||||||
@ -582,7 +582,7 @@ void StandardShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv
|
|||||||
stateset->setAttributeAndModes
|
stateset->setAttributeAndModes
|
||||||
( new osg::AlphaFunc( osg::AlphaFunc::GREATER, 0 ), osg::StateAttribute::ON );
|
( new osg::AlphaFunc( osg::AlphaFunc::GREATER, 0 ), osg::StateAttribute::ON );
|
||||||
|
|
||||||
// agressive optimization
|
// aggressive optimization
|
||||||
stateset->setAttributeAndModes
|
stateset->setAttributeAndModes
|
||||||
( new osg::ColorMask( false, false, false, false ),
|
( new osg::ColorMask( false, false, false, false ),
|
||||||
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
|
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
|
||||||
|
@ -2145,7 +2145,7 @@ bool ViewDependentShadowMap::adjustPerspectiveShadowMapCameraSettings(osgUtil::R
|
|||||||
double gamma_v = acos(dotProduct_v);
|
double gamma_v = acos(dotProduct_v);
|
||||||
if (gamma_v<osg::DegreesToRadians(settings->getPerspectiveShadowMapCutOffAngle()) || gamma_v>osg::DegreesToRadians(180-settings->getPerspectiveShadowMapCutOffAngle()))
|
if (gamma_v<osg::DegreesToRadians(settings->getPerspectiveShadowMapCutOffAngle()) || gamma_v>osg::DegreesToRadians(180-settings->getPerspectiveShadowMapCutOffAngle()))
|
||||||
{
|
{
|
||||||
// OSG_NOTICE<<"Light and view vectors near parrallel - use standard shadow map."<<std::endl;
|
// OSG_NOTICE<<"Light and view vectors near parallel - use standard shadow map."<<std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ void InsertImpostorsVisitor::insertImpostors()
|
|||||||
impostor->addChild(group);
|
impostor->addChild(group);
|
||||||
impostor->setRange(0,0.0f,1e7f);
|
impostor->setRange(0,0.0f,1e7f);
|
||||||
|
|
||||||
// impostor specfic settings.
|
// impostor specific settings.
|
||||||
impostor->setImpostorThresholdToBound(_impostorThresholdRatio);
|
impostor->setImpostorThresholdToBound(_impostorThresholdRatio);
|
||||||
|
|
||||||
// now replace the group by the new impostor in all of the
|
// now replace the group by the new impostor in all of the
|
||||||
@ -157,7 +157,7 @@ void InsertImpostorsVisitor::insertImpostors()
|
|||||||
impostor->setCenter(lod->getCenter());
|
impostor->setCenter(lod->getCenter());
|
||||||
impostor->setCenterMode(lod->getCenterMode());
|
impostor->setCenterMode(lod->getCenterMode());
|
||||||
|
|
||||||
// impostor specfic settings.
|
// impostor specific settings.
|
||||||
impostor->setImpostorThresholdToBound(_impostorThresholdRatio);
|
impostor->setImpostorThresholdToBound(_impostorThresholdRatio);
|
||||||
|
|
||||||
// now replace the lod by the new impostor in all of the
|
// now replace the lod by the new impostor in all of the
|
||||||
|
@ -301,7 +301,7 @@ float DirectionalSector::operator() (const osg::Vec3& eyeLocal) const
|
|||||||
{
|
{
|
||||||
float elev_intensity, azim_intensity ;
|
float elev_intensity, azim_intensity ;
|
||||||
|
|
||||||
// Tranform eyeLocal into the LightPoint frame
|
// Transform eyeLocal into the LightPoint frame
|
||||||
osg::Vec3 EPlp = _local_to_LP * eyeLocal ;
|
osg::Vec3 EPlp = _local_to_LP * eyeLocal ;
|
||||||
|
|
||||||
/*fprintf(stderr, " eyeLocal = %f, %f, %f\n", eyeLocal[0], eyeLocal[1], eyeLocal[2]) ;
|
/*fprintf(stderr, " eyeLocal = %f, %f, %f\n", eyeLocal[0], eyeLocal[1], eyeLocal[2]) ;
|
||||||
|
@ -500,7 +500,7 @@ public:
|
|||||||
osg::ref_ptr<osg::DrawElementsUShort> face = new osg::DrawElementsUShort(GL_POLYGON);
|
osg::ref_ptr<osg::DrawElementsUShort> face = new osg::DrawElementsUShort(GL_POLYGON);
|
||||||
face->setName(faceName);
|
face->setName(faceName);
|
||||||
|
|
||||||
// reserve enough space in the vertex array to accomodate the vertices associated with the segments
|
// reserve enough space in the vertex array to accommodate the vertices associated with the segments
|
||||||
new_vertices->reserve(new_vertices->size() + _segments.size()+1 + count);
|
new_vertices->reserve(new_vertices->size() + _segments.size()+1 + count);
|
||||||
|
|
||||||
// create vertices
|
// create vertices
|
||||||
|
@ -430,7 +430,7 @@ void TextBase::positionCursor(const osg::Vec2 & endOfLine_coords, osg::Vec2 & cu
|
|||||||
switch (_alignment)
|
switch (_alignment)
|
||||||
{
|
{
|
||||||
// TODO: current behaviour top baselines lined up in both cases - need to implement
|
// TODO: current behaviour top baselines lined up in both cases - need to implement
|
||||||
// top of characters aligment - Question is this neccesary?
|
// top of characters aligment - Question is this necessary?
|
||||||
// ... otherwise, nothing to be done for these 6 cases
|
// ... otherwise, nothing to be done for these 6 cases
|
||||||
//case LEFT_TOP:
|
//case LEFT_TOP:
|
||||||
//case CENTER_TOP:
|
//case CENTER_TOP:
|
||||||
|
@ -908,7 +908,7 @@ bool DelaunayTriangulator::triangulate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// dec 2006 we used to remove supertriangle vertices here, but then we cant strictly use the supertriangle
|
// dec 2006 we used to remove supertriangle vertices here, but then we can't strictly use the supertriangle
|
||||||
// vertices to find intersections of constraints with terrain, so moved to later.
|
// vertices to find intersections of constraints with terrain, so moved to later.
|
||||||
|
|
||||||
OSG_INFO << "DelaunayTriangulator: finalizing and cleaning up structures\n";
|
OSG_INFO << "DelaunayTriangulator: finalizing and cleaning up structures\n";
|
||||||
|
@ -4249,7 +4249,7 @@ void Optimizer::TextureAtlasVisitor::optimize()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if no texcoords then texgen must be being used, therefore must assume that texture is truely repeating
|
// if no texcoords then texgen must be being used, therefore must assume that texture is truly repeating
|
||||||
s_outOfRange = true;
|
s_outOfRange = true;
|
||||||
t_outOfRange = true;
|
t_outOfRange = true;
|
||||||
}
|
}
|
||||||
|
@ -1025,7 +1025,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// reset the read and draw buffers? will comment out for now with the assumption that
|
// reset the read and draw buffers? will comment out for now with the assumption that
|
||||||
// the buffers will be set explictly when needed elsewhere.
|
// the buffers will be set explicitly when needed elsewhere.
|
||||||
// glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
// glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
||||||
// glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
// glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
||||||
}
|
}
|
||||||
@ -1159,7 +1159,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
|
|||||||
|
|
||||||
if (_camera.valid() && _camera->getInitialDrawCallback())
|
if (_camera.valid() && _camera->getInitialDrawCallback())
|
||||||
{
|
{
|
||||||
// if we have a camera with a intial draw callback invoke it.
|
// if we have a camera with a initial draw callback invoke it.
|
||||||
(*(_camera->getInitialDrawCallback()))(renderInfo);
|
(*(_camera->getInitialDrawCallback()))(renderInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ public:
|
|||||||
if (itr!=_edgeSet.end())
|
if (itr!=_edgeSet.end())
|
||||||
{
|
{
|
||||||
// remove the edge from the list, as its positoin in the list
|
// remove the edge from the list, as its positoin in the list
|
||||||
// may need to change once its values have been ammended
|
// may need to change once its values have been amended
|
||||||
_edgeSet.erase(itr);
|
_edgeSet.erase(itr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ CompositeViewer::CompositeViewer(osg::ArgumentParser& arguments)
|
|||||||
|
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-on-demand","Set the run methods frame rate management to only rendering frames when required.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-on-demand","Set the run methods frame rate management to only rendering frames when required.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-continuous","Set the run methods frame rate management to rendering frames continuously.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-continuous","Set the run methods frame rate management to rendering frames continuously.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-max-frame-rate","Set the run methods maximum permissable frame rate, 0.0 is default and switching off frame rate capping.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-max-frame-rate","Set the run methods maximum permissible frame rate, 0.0 is default and switching off frame rate capping.");
|
||||||
|
|
||||||
|
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
@ -969,7 +969,7 @@ void Win32WindowingSystem::getScreenSettings( const osg::GraphicsContext::Screen
|
|||||||
if (resolution.refreshRate == 0 || resolution.refreshRate == 1) {
|
if (resolution.refreshRate == 0 || resolution.refreshRate == 1) {
|
||||||
// Windows specific: 0 and 1 represent the hhardware's default refresh rate.
|
// Windows specific: 0 and 1 represent the hhardware's default refresh rate.
|
||||||
// If someone knows how to get this refresh rate (in Hz)...
|
// If someone knows how to get this refresh rate (in Hz)...
|
||||||
OSG_NOTICE << "Win32WindowingSystem::getScreenSettings() is not fully implemented (cannot retreive the hardware's default refresh rate)."<<std::endl;
|
OSG_NOTICE << "Win32WindowingSystem::getScreenSettings() is not fully implemented (cannot retrieve the hardware's default refresh rate)."<<std::endl;
|
||||||
resolution.refreshRate = 0;
|
resolution.refreshRate = 0;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -1255,7 +1255,7 @@ void GraphicsWindowWin32::init()
|
|||||||
//
|
//
|
||||||
// When using OpenGL in threaded app ( main thread sets up context / renderer thread draws using it )
|
// When using OpenGL in threaded app ( main thread sets up context / renderer thread draws using it )
|
||||||
// first wglMakeCurrent seems to not work right and screw OpenGL context driver data:
|
// first wglMakeCurrent seems to not work right and screw OpenGL context driver data:
|
||||||
// 1: succesive drawing shows a number of artifacts in TriangleStrips and TriangleFans
|
// 1: successive drawing shows a number of artifacts in TriangleStrips and TriangleFans
|
||||||
// 2: weird behaviour of FramBufferObjects (glGenFramebuffer generates already generated ids ...)
|
// 2: weird behaviour of FramBufferObjects (glGenFramebuffer generates already generated ids ...)
|
||||||
// Looks like repeating wglMakeCurrent call fixes all these issues
|
// Looks like repeating wglMakeCurrent call fixes all these issues
|
||||||
// wglMakeCurrent call can impact performance so I try to minimize number of
|
// wglMakeCurrent call can impact performance so I try to minimize number of
|
||||||
@ -1749,7 +1749,7 @@ bool GraphicsWindowWin32::setPixelFormat()
|
|||||||
<< _traits->screenNum
|
<< _traits->screenNum
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
_traits->red = bpp / 4; //integer devide, determine minimum number of bits we will accept
|
_traits->red = bpp / 4; //integer divide, determine minimum number of bits we will accept
|
||||||
_traits->green = bpp / 4;
|
_traits->green = bpp / 4;
|
||||||
_traits->blue = bpp / 4;
|
_traits->blue = bpp / 4;
|
||||||
::PreparePixelFormatSpecifications(*_traits, formatSpecs, true);// try again with WGL_SWAP_METHOD_ARB
|
::PreparePixelFormatSpecifications(*_traits, formatSpecs, true);// try again with WGL_SWAP_METHOD_ARB
|
||||||
|
@ -679,7 +679,7 @@ void GraphicsWindowX11::init()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSG_NOTICE<<"GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion="<<eglMajorVersion<<" iMinorVersion="<<eglMinorVersion<<std::endl;
|
OSG_NOTICE<<"GraphicsWindowX11::init() - eglInitialize() succeeded eglMajorVersion="<<eglMajorVersion<<" iMinorVersion="<<eglMinorVersion<<std::endl;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// Query for GLX extension
|
// Query for GLX extension
|
||||||
@ -903,7 +903,7 @@ bool GraphicsWindowX11::createWindow()
|
|||||||
// we have a modern X11 server so assume we need the do the full screen hack.
|
// we have a modern X11 server so assume we need the do the full screen hack.
|
||||||
if (netWMStateAtom != None && netWMStateFullscreenAtom != None)
|
if (netWMStateAtom != None && netWMStateFullscreenAtom != None)
|
||||||
{
|
{
|
||||||
// artifically reduce the initial window size so that the windowing
|
// artificially reduce the initial window size so that the windowing
|
||||||
// system has a size to go back to when toggling off full screen,
|
// system has a size to go back to when toggling off full screen,
|
||||||
// we don't have to worry about the window being initially smaller as the
|
// we don't have to worry about the window being initially smaller as the
|
||||||
// setWindowDecoration(..) implementation with enable full screen for us
|
// setWindowDecoration(..) implementation with enable full screen for us
|
||||||
|
@ -64,7 +64,7 @@ Viewer::Viewer(osg::ArgumentParser& arguments)
|
|||||||
|
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-on-demand","Set the run methods frame rate management to only rendering frames when required.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-on-demand","Set the run methods frame rate management to only rendering frames when required.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-continuous","Set the run methods frame rate management to rendering frames continuously.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-continuous","Set the run methods frame rate management to rendering frames continuously.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--run-max-frame-rate","Set the run methods maximum permissable frame rate, 0.0 is default and switching off frame rate capping.");
|
arguments.getApplicationUsage()->addCommandLineOption("--run-max-frame-rate","Set the run methods maximum permissible frame rate, 0.0 is default and switching off frame rate capping.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--enable-object-cache","Enable caching of objects, images, etc.");
|
arguments.getApplicationUsage()->addCommandLineOption("--enable-object-cache","Enable caching of objects, images, etc.");
|
||||||
|
|
||||||
// FIXME: Uncomment these lines when the options have been documented properly
|
// FIXME: Uncomment these lines when the options have been documented properly
|
||||||
@ -862,10 +862,6 @@ void Viewer::reprojectPointerData(osgGA::GUIEventAdapter& source_event, osgGA::G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void generateOrReprojectPointerData(osgGA::GUIEventAdapter& source_event, osgGA::GUIEventAdapter& dest_event)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Viewer::eventTraversal()
|
void Viewer::eventTraversal()
|
||||||
{
|
{
|
||||||
if (_done) return;
|
if (_done) return;
|
||||||
|
@ -91,7 +91,7 @@ void Box::_resizeImplementation(point_type w, point_type h) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the width and height of our largest widgets; these values take
|
// Get the width and height of our largest widgets; these values take
|
||||||
// into account the padding, and will be affected by any resizing that occured above.
|
// into account the padding, and will be affected by any resizing that occurred above.
|
||||||
point_type maxWidth = _getMaxWidgetWidthTotal();
|
point_type maxWidth = _getMaxWidgetWidthTotal();
|
||||||
point_type maxHeight = _getMaxWidgetHeightTotal();
|
point_type maxHeight = _getMaxWidgetHeightTotal();
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ Widget::Layer Style::strToLayer(const std::string& layer)
|
|||||||
else if(l == "bg") return Widget::LAYER_BG;
|
else if(l == "bg") return Widget::LAYER_BG;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
warn() << "Unkown Layer name [" << layer << "]; using LAYER_MIDDLE." << std::endl;
|
warn() << "Unknown Layer name [" << layer << "]; using LAYER_MIDDLE." << std::endl;
|
||||||
|
|
||||||
return Widget::LAYER_MIDDLE;
|
return Widget::LAYER_MIDDLE;
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@ Widget::VerticalAlignment Style::strToVAlign(const std::string& valign) {
|
|||||||
else if(va == "bottom") return Widget::VA_BOTTOM;
|
else if(va == "bottom") return Widget::VA_BOTTOM;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
warn() << "Unkown VAlign name [" << valign << "]; using VA_CENTER." << std::endl;
|
warn() << "Unknown VAlign name [" << valign << "]; using VA_CENTER." << std::endl;
|
||||||
|
|
||||||
return Widget::VA_CENTER;
|
return Widget::VA_CENTER;
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ Widget::HorizontalAlignment Style::strToHAlign(const std::string& halign) {
|
|||||||
else if(ha == "right") return Widget::HA_RIGHT;
|
else if(ha == "right") return Widget::HA_RIGHT;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
warn() << "Unkown HAlign name [" << halign << "]; using HA_CENTER." << std::endl;
|
warn() << "Unknown HAlign name [" << halign << "]; using HA_CENTER." << std::endl;
|
||||||
|
|
||||||
return Widget::HA_CENTER;
|
return Widget::HA_CENTER;
|
||||||
}
|
}
|
||||||
@ -302,7 +302,7 @@ Widget::CoordinateMode Style::strToCoordMode(const std::string& coordmode) {
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
warn()
|
warn()
|
||||||
<< "Unkown CoordMode name [" << coordmode
|
<< "Unknown CoordMode name [" << coordmode
|
||||||
<< "]; using CM_ABSOLUTE." << std::endl
|
<< "]; using CM_ABSOLUTE." << std::endl
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ bool Style::strToFill(const std::string& fill) {
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
warn()
|
warn()
|
||||||
<< "Unkown Fill name [" << fill
|
<< "Unknown Fill name [" << fill
|
||||||
<< "]; using false." << std::endl
|
<< "]; using false." << std::endl
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ void Window::EmbeddedWindow::positioned() {
|
|||||||
point_type h = getHeight();
|
point_type h = getHeight();
|
||||||
|
|
||||||
// If the widget is fillable, ask the internal Window to resize itself.
|
// If the widget is fillable, ask the internal Window to resize itself.
|
||||||
// Whether or not the Window honors this reqest will be up to it.
|
// Whether or not the Window honors this request will be up to it.
|
||||||
_window->setOrigin(x, y);
|
_window->setOrigin(x, y);
|
||||||
_window->setZ(_calculateZ(getLayer() + 1));
|
_window->setZ(_calculateZ(getLayer() + 1));
|
||||||
_window->setZRange(_calculateZ(LAYER_TOP - (getLayer() + 1)));
|
_window->setZRange(_calculateZ(LAYER_TOP - (getLayer() + 1)));
|
||||||
|
Loading…
Reference in New Issue
Block a user