Renamed include/osg/OperationsThread to OperationThread.
Created a new GraphicsThread subclass from OperationThread which allows the GraphicsContext specific calls to be moved out of the base OperationThread class. Updated the rest of the OSG to respect these changes.
This commit is contained in:
58
ChangeLog
58
ChangeLog
@@ -1,3 +1,61 @@
|
||||
2007-07-11 16:06 +0000 [r7102-7103] robert:
|
||||
|
||||
* Updated wrappers
|
||||
|
||||
* Fixed typo
|
||||
|
||||
2007-07-11 15:51 +0000 [r7100-7101] robert:
|
||||
|
||||
* From Paul Melis, fixes to spelling mistakes/typos.
|
||||
|
||||
* Updated version number in prep for 2.1.1 dev release
|
||||
|
||||
2007-07-11 15:30 +0000 [r7099] robert:
|
||||
|
||||
* From Andre Garneau, minor warning fixes
|
||||
|
||||
2007-07-11 14:16 +0000 [r7098] robert:
|
||||
|
||||
* Added support for --sky-light and headlight with local position
|
||||
at 0,0,0
|
||||
|
||||
2007-07-11 13:48 +0000 [r7097] robert:
|
||||
|
||||
* Added setting of the Scene's FrameStamp on each
|
||||
CompositeViewer::updateTraversal() call to fix animation path
|
||||
issue.
|
||||
|
||||
2007-07-11 09:00 +0000 [r7096] robert:
|
||||
|
||||
* From Martin Lavery, update of Xcode projects to meet the latest
|
||||
SVN revision
|
||||
|
||||
2007-07-10 19:29 +0000 [r7095] robert:
|
||||
|
||||
* Added OperationsThread
|
||||
|
||||
2007-07-10 17:36 +0000 [r7093-7094] robert:
|
||||
|
||||
* Added test code path which stress tests new thread pool support
|
||||
in OperationsThread
|
||||
|
||||
* Wired up OperationsThread to use the new OperationQueue and
|
||||
thereby support thread pooling where multiple OperationsThreads
|
||||
share a single OperationsQueue
|
||||
|
||||
2007-07-09 19:04 +0000 [r7092] robert:
|
||||
|
||||
* Separated OperationsThread out from the GraphicsThread header and
|
||||
introduced new OperationQueue class.
|
||||
|
||||
2007-07-09 15:02 +0000 [r7091] robert:
|
||||
|
||||
* Fixed unitialized variables.
|
||||
|
||||
2007-07-09 11:37 +0000 [r7088] robert:
|
||||
|
||||
* Updated ChangeLog, osgversion and AUTHORS.txt for 2.1 dev release
|
||||
|
||||
2007-07-09 11:05 +0000 [r7085-7087] robert:
|
||||
|
||||
* Updated version number for 2.1.0 dev release
|
||||
|
||||
@@ -352,13 +352,13 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
|
||||
void createCameraThread();
|
||||
|
||||
/** Assign a operation thread to the camera.*/
|
||||
void setCameraThread(OperationsThread* gt);
|
||||
void setCameraThread(OperationThread* gt);
|
||||
|
||||
/** Get the operation thread assigned to this camera.*/
|
||||
OperationsThread* getCameraThread() { return _cameraThread.get(); }
|
||||
OperationThread* getCameraThread() { return _cameraThread.get(); }
|
||||
|
||||
/** Get the const operation thread assigned to this camera.*/
|
||||
const OperationsThread* getCameraThread() const { return _cameraThread.get(); }
|
||||
const OperationThread* getCameraThread() const { return _cameraThread.get(); }
|
||||
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
|
||||
RenderTargetImplementation _renderTargetFallback;
|
||||
BufferAttachmentMap _bufferAttachmentMap;
|
||||
|
||||
ref_ptr<OperationsThread> _cameraThread;
|
||||
ref_ptr<OperationThread> _cameraThread;
|
||||
|
||||
ref_ptr<GraphicsContext> _graphicsContext;
|
||||
|
||||
|
||||
@@ -303,13 +303,13 @@ class OSG_EXPORT GraphicsContext : public Object
|
||||
void createGraphicsThread();
|
||||
|
||||
/** Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations.*/
|
||||
void setGraphicsThread(OperationsThread* gt);
|
||||
void setGraphicsThread(GraphicsThread* gt);
|
||||
|
||||
/** Get the graphics thread assigned the graphics context.*/
|
||||
OperationsThread* getGraphicsThread() { return _graphicsThread.get(); }
|
||||
GraphicsThread* getGraphicsThread() { return _graphicsThread.get(); }
|
||||
|
||||
/** Get the const graphics thread assigned the graphics context.*/
|
||||
const OperationsThread* getGraphicsThread() const { return _graphicsThread.get(); }
|
||||
const GraphicsThread* getGraphicsThread() const { return _graphicsThread.get(); }
|
||||
|
||||
|
||||
/** Realise the GraphicsContext implementation,
|
||||
@@ -423,7 +423,7 @@ class OSG_EXPORT GraphicsContext : public Object
|
||||
OperationQueue _operations;
|
||||
osg::ref_ptr<Operation> _currentOperation;
|
||||
|
||||
ref_ptr<OperationsThread> _graphicsThread;
|
||||
ref_ptr<GraphicsThread> _graphicsThread;
|
||||
|
||||
ref_ptr<ResizedCallback> _resizedCallback;
|
||||
|
||||
|
||||
@@ -14,10 +14,20 @@
|
||||
#ifndef OSG_GRAPHICSTHREAD
|
||||
#define OSG_GRAPHICSTHREAD 1
|
||||
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
|
||||
namespace osg {
|
||||
|
||||
class OSG_EXPORT GraphicsThread : public osg::OperationThread
|
||||
{
|
||||
public:
|
||||
|
||||
GraphicsThread();
|
||||
|
||||
/** Run does the graphics thread run loop.*/
|
||||
virtual void run();
|
||||
};
|
||||
|
||||
/** SwapBufferOperation calls swap buffers on the GraphicsContext.*/
|
||||
struct OSG_EXPORT SwapBuffersOperation : public Operation
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ class OSG_EXPORT OperationThread : public Referenced, public OpenThreads::Thread
|
||||
/** Get the operation currently being run.*/
|
||||
osg::ref_ptr<Operation> getCurrentOperation() { return _currentOperation; }
|
||||
|
||||
/** Run does the graphics thread run loop.*/
|
||||
/** Run does the opertion thread run loop.*/
|
||||
virtual void run();
|
||||
|
||||
void setDone(bool done);
|
||||
@@ -121,22 +121,14 @@ class OSGTERRAIN_EXPORT TerrainNode : public osg::Group
|
||||
bool getTreatBoundariesToValidDataAsDefaultValue() const { return _treatBoundariesToValidDataAsDefaultValue; }
|
||||
|
||||
|
||||
/** Set an OperationsThread to do an data initialization and update work.*/
|
||||
void setOperationsThread(osg::OperationsThread* operationsThread) { _operationsThread = operationsThread; }
|
||||
/** Set an OperationQueue to do an data initialization and update work.*/
|
||||
void setOperationQueue(osg::OperationQueue* operations) { _operationQueue = operations; }
|
||||
|
||||
/** Get the OperationsThread if one is attached, return NULL otherwise.*/
|
||||
osg::OperationsThread* getOperationsThread() { return _operationsThread.get(); }
|
||||
|
||||
/** Get the const OperationsThread if one is attached, return NULL otherwise.*/
|
||||
const osg::OperationsThread* getOperationsThread() const { return _operationsThread.get(); }
|
||||
|
||||
|
||||
/** Add a graphics context that should be used to compile/delete OpenGL objects.*/
|
||||
void addCompileGraphicsContext(osg::GraphicsContext* gc);
|
||||
|
||||
/** Removed a graphics context that should be used to compile/delete OpenGL objects.*/
|
||||
void removeCompileGraphicsContext(osg::GraphicsContext* gc);
|
||||
/** Get the OperationsQueue if one is attached, return NULL otherwise.*/
|
||||
osg::OperationQueue* getOperationQueue() { return _operationQueue.get(); }
|
||||
|
||||
/** Get the const OperationsQueue if one is attached, return NULL otherwise.*/
|
||||
const osg::OperationQueue* getOperationsQueue() const { return _operationQueue.get(); }
|
||||
|
||||
/** Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers.*/
|
||||
virtual osg::BoundingSphere computeBound() const;
|
||||
@@ -180,10 +172,7 @@ class OSGTERRAIN_EXPORT TerrainNode : public osg::Group
|
||||
bool _requiresNormals;
|
||||
bool _treatBoundariesToValidDataAsDefaultValue;
|
||||
|
||||
osg::ref_ptr<osg::OperationsThread> _operationsThread;
|
||||
|
||||
typedef std::vector< osg::observer_ptr<osg::GraphicsContext> > CompileGraphicsContexts;
|
||||
CompileGraphicsContexts _compileGraphicsContexts;
|
||||
osg::ref_ptr<osg::OperationQueue> _operationQueue;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View
|
||||
typedef std::vector<OpenThreads::Thread*> Threads;
|
||||
void getAllThreads(Threads& threads, bool onlyActive=true);
|
||||
|
||||
typedef std::vector<osg::OperationsThread*> OperationsThreads;
|
||||
void getOperationsThreads(OperationsThreads& threads, bool onlyActive=true);
|
||||
typedef std::vector<osg::OperationThread*> OperationThreads;
|
||||
void getOperationThreads(OperationThreads& threads, bool onlyActive=true);
|
||||
|
||||
/** Set the graphics operation to call on realization of the viewers graphics windows.*/
|
||||
void setRealizeOperation(osg::Operation* op) { _realizeOperation = op; }
|
||||
|
||||
@@ -91,7 +91,7 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/Notify
|
||||
${HEADER_PATH}/Object
|
||||
${HEADER_PATH}/OccluderNode
|
||||
${HEADER_PATH}/OperationsThread
|
||||
${HEADER_PATH}/OperationThread
|
||||
${HEADER_PATH}/PagedLOD
|
||||
${HEADER_PATH}/Plane
|
||||
${HEADER_PATH}/Point
|
||||
@@ -246,7 +246,7 @@ ADD_LIBRARY(${LIB_NAME}
|
||||
Notify.cpp
|
||||
Object.cpp
|
||||
OccluderNode.cpp
|
||||
OperationsThread.cpp
|
||||
OperationThread.cpp
|
||||
PagedLOD.cpp
|
||||
Point.cpp
|
||||
PointSprite.cpp
|
||||
|
||||
@@ -313,11 +313,11 @@ void Camera::createCameraThread()
|
||||
{
|
||||
if (!_cameraThread)
|
||||
{
|
||||
setCameraThread(new OperationsThread);
|
||||
setCameraThread(new OperationThread);
|
||||
}
|
||||
}
|
||||
|
||||
void Camera::setCameraThread(OperationsThread* gt)
|
||||
void Camera::setCameraThread(OperationThread* gt)
|
||||
{
|
||||
if (_cameraThread==gt) return;
|
||||
|
||||
|
||||
@@ -472,11 +472,11 @@ void GraphicsContext::createGraphicsThread()
|
||||
{
|
||||
if (!_graphicsThread)
|
||||
{
|
||||
setGraphicsThread(new OperationsThread);
|
||||
setGraphicsThread(new GraphicsThread);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsContext::setGraphicsThread(OperationsThread* gt)
|
||||
void GraphicsContext::setGraphicsThread(GraphicsThread* gt)
|
||||
{
|
||||
if (_graphicsThread==gt) return;
|
||||
|
||||
|
||||
@@ -19,6 +19,28 @@
|
||||
using namespace osg;
|
||||
using namespace OpenThreads;
|
||||
|
||||
GraphicsThread::GraphicsThread()
|
||||
{
|
||||
}
|
||||
|
||||
void GraphicsThread::run()
|
||||
{
|
||||
// make the graphics context current.
|
||||
GraphicsContext* graphicsContext = dynamic_cast<GraphicsContext*>(_parent.get());
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->makeCurrent();
|
||||
}
|
||||
|
||||
OperationThread::run();
|
||||
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->releaseContext();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct BlockOperation : public Operation, public Block
|
||||
{
|
||||
BlockOperation():
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/GraphicsContext>
|
||||
#include <osg/Notify>
|
||||
|
||||
@@ -347,13 +347,6 @@ void OperationThread::removeAllOperations()
|
||||
|
||||
void OperationThread::run()
|
||||
{
|
||||
// make the graphics context current.
|
||||
GraphicsContext* graphicsContext = dynamic_cast<GraphicsContext*>(_parent.get());
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->makeCurrent();
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO)<<"Doing run "<<this<<" isRunning()="<<isRunning()<<std::endl;
|
||||
|
||||
bool firstTime = true;
|
||||
@@ -403,11 +396,6 @@ void OperationThread::run()
|
||||
|
||||
} while (!testCancel() && !_done);
|
||||
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->releaseContext();
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO)<<"exit loop "<<this<<" isRunning()="<<isRunning()<<std::endl;
|
||||
|
||||
}
|
||||
@@ -602,7 +602,7 @@ void DatabasePager::run()
|
||||
osg::GraphicsContext* gc = osg::GraphicsContext::getCompileContext(*itr);
|
||||
if (gc)
|
||||
{
|
||||
osg::OperationsThread* gt = gc->getGraphicsThread();
|
||||
osg::GraphicsThread* gt = gc->getGraphicsThread();
|
||||
if (gt)
|
||||
{
|
||||
gt->add(new DatabasePager::CompileOperation(this));
|
||||
|
||||
@@ -99,36 +99,6 @@ void TerrainNode::setColorFilter(unsigned int i, Filter filter)
|
||||
_colorLayers[i].filter = filter;
|
||||
}
|
||||
|
||||
void TerrainNode::addCompileGraphicsContext(osg::GraphicsContext* gc)
|
||||
{
|
||||
for(CompileGraphicsContexts::iterator itr = _compileGraphicsContexts.begin();
|
||||
itr != _compileGraphicsContexts.end();
|
||||
++itr)
|
||||
{
|
||||
if (*itr == gc)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_compileGraphicsContexts.push_back(gc);
|
||||
}
|
||||
|
||||
void TerrainNode::removeCompileGraphicsContext(osg::GraphicsContext* gc)
|
||||
{
|
||||
for(CompileGraphicsContexts::iterator itr = _compileGraphicsContexts.begin();
|
||||
itr != _compileGraphicsContexts.end();
|
||||
++itr)
|
||||
{
|
||||
if (*itr == gc)
|
||||
{
|
||||
_compileGraphicsContexts.erase(itr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
osg::BoundingSphere TerrainNode::computeBound() const
|
||||
{
|
||||
osg::BoundingSphere bs;
|
||||
|
||||
@@ -842,7 +842,7 @@ void RenderStage::draw(osg::RenderInfo& renderInfo,RenderLeaf*& previous)
|
||||
osg::State* useState = &state;
|
||||
osg::GraphicsContext* callingContext = state.getGraphicsContext();
|
||||
osg::GraphicsContext* useContext = callingContext;
|
||||
osg::OperationsThread* useThread = 0;
|
||||
osg::OperationThread* useThread = 0;
|
||||
osg::RenderInfo useRenderInfo(renderInfo);
|
||||
|
||||
RenderLeaf* saved_previous = previous;
|
||||
|
||||
@@ -1469,11 +1469,11 @@ void Viewer::getCameras(Cameras& cameras, bool onlyActive)
|
||||
|
||||
void Viewer::getAllThreads(Threads& threads, bool onlyActive)
|
||||
{
|
||||
OperationsThreads operationsThreads;
|
||||
getOperationsThreads(operationsThreads);
|
||||
OperationThreads operationThreads;
|
||||
getOperationThreads(operationThreads);
|
||||
|
||||
for(OperationsThreads::iterator itr = operationsThreads.begin();
|
||||
itr != operationsThreads.end();
|
||||
for(OperationThreads::iterator itr = operationThreads.begin();
|
||||
itr != operationThreads.end();
|
||||
++itr)
|
||||
{
|
||||
threads.push_back(*itr);
|
||||
@@ -1488,7 +1488,7 @@ void Viewer::getAllThreads(Threads& threads, bool onlyActive)
|
||||
}
|
||||
|
||||
|
||||
void Viewer::getOperationsThreads(OperationsThreads& threads, bool onlyActive)
|
||||
void Viewer::getOperationThreads(OperationThreads& threads, bool onlyActive)
|
||||
{
|
||||
threads.clear();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <osg/Matrixf>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/State>
|
||||
#include <osg/Stats>
|
||||
#include <osg/Texture>
|
||||
@@ -446,19 +446,19 @@ BEGIN_OBJECT_REFLECTOR(osg::Camera)
|
||||
__void__createCameraThread,
|
||||
"Create a operation thread for this camera. ",
|
||||
"");
|
||||
I_Method1(void, setCameraThread, IN, osg::OperationsThread *, gt,
|
||||
I_Method1(void, setCameraThread, IN, osg::OperationThread *, gt,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setCameraThread__OperationsThread_P1,
|
||||
__void__setCameraThread__OperationThread_P1,
|
||||
"Assign a operation thread to the camera. ",
|
||||
"");
|
||||
I_Method0(osg::OperationsThread *, getCameraThread,
|
||||
I_Method0(osg::OperationThread *, getCameraThread,
|
||||
Properties::NON_VIRTUAL,
|
||||
__OperationsThread_P1__getCameraThread,
|
||||
__OperationThread_P1__getCameraThread,
|
||||
"Get the operation thread assigned to this camera. ",
|
||||
"");
|
||||
I_Method0(const osg::OperationsThread *, getCameraThread,
|
||||
I_Method0(const osg::OperationThread *, getCameraThread,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_OperationsThread_P1__getCameraThread,
|
||||
__C5_OperationThread_P1__getCameraThread,
|
||||
"Get the const operation thread assigned to this camera. ",
|
||||
"");
|
||||
I_Method1(void, setGraphicsContext, IN, osg::GraphicsContext *, context,
|
||||
@@ -552,9 +552,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Camera)
|
||||
I_SimpleProperty(osg::Camera::BufferAttachmentMap &, BufferAttachmentMap,
|
||||
__BufferAttachmentMap_R1__getBufferAttachmentMap,
|
||||
0);
|
||||
I_SimpleProperty(osg::OperationsThread *, CameraThread,
|
||||
__OperationsThread_P1__getCameraThread,
|
||||
__void__setCameraThread__OperationsThread_P1);
|
||||
I_SimpleProperty(osg::OperationThread *, CameraThread,
|
||||
__OperationThread_P1__getCameraThread,
|
||||
__void__setCameraThread__OperationThread_P1);
|
||||
I_SimpleProperty(const osg::Vec4 &, ClearColor,
|
||||
__C5_Vec4_R1__getClearColor,
|
||||
__void__setClearColor__C5_Vec4_R1);
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <osg/GraphicsContext>
|
||||
#include <osg/GraphicsThread>
|
||||
#include <osg/Object>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/State>
|
||||
#include <osg/Vec4>
|
||||
|
||||
@@ -181,19 +182,19 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
__void__createGraphicsThread,
|
||||
"Create a graphics thread to the graphics context, so that the thread handles all OpenGL operations. ",
|
||||
"");
|
||||
I_Method1(void, setGraphicsThread, IN, osg::OperationsThread *, gt,
|
||||
I_Method1(void, setGraphicsThread, IN, osg::GraphicsThread *, gt,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setGraphicsThread__OperationsThread_P1,
|
||||
__void__setGraphicsThread__GraphicsThread_P1,
|
||||
"Assign a graphics thread to the graphics context, so that the thread handles all OpenGL operations. ",
|
||||
"");
|
||||
I_Method0(osg::OperationsThread *, getGraphicsThread,
|
||||
I_Method0(osg::GraphicsThread *, getGraphicsThread,
|
||||
Properties::NON_VIRTUAL,
|
||||
__OperationsThread_P1__getGraphicsThread,
|
||||
__GraphicsThread_P1__getGraphicsThread,
|
||||
"Get the graphics thread assigned the graphics context. ",
|
||||
"");
|
||||
I_Method0(const osg::OperationsThread *, getGraphicsThread,
|
||||
I_Method0(const osg::GraphicsThread *, getGraphicsThread,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_OperationsThread_P1__getGraphicsThread,
|
||||
__C5_GraphicsThread_P1__getGraphicsThread,
|
||||
"Get the const graphics thread assigned the graphics context. ",
|
||||
"");
|
||||
I_Method0(bool, realizeImplementation,
|
||||
@@ -377,9 +378,9 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::GraphicsContext)
|
||||
I_SimpleProperty(osg::Operation *, CurrentOperation,
|
||||
__Operation_P1__getCurrentOperation,
|
||||
0);
|
||||
I_SimpleProperty(osg::OperationsThread *, GraphicsThread,
|
||||
__OperationsThread_P1__getGraphicsThread,
|
||||
__void__setGraphicsThread__OperationsThread_P1);
|
||||
I_SimpleProperty(osg::GraphicsThread *, GraphicsThread,
|
||||
__GraphicsThread_P1__getGraphicsThread,
|
||||
__void__setGraphicsThread__GraphicsThread_P1);
|
||||
I_SimpleProperty(osg::RefBlock *, OperationsBlock,
|
||||
__osg_RefBlock_P1__getOperationsBlock,
|
||||
0);
|
||||
|
||||
@@ -58,6 +58,19 @@ BEGIN_OBJECT_REFLECTOR(osg::BlockAndFlushOperation)
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::GraphicsThread)
|
||||
I_DeclaringFile("osg/GraphicsThread");
|
||||
I_BaseType(osg::OperationThread);
|
||||
I_Constructor0(____GraphicsThread,
|
||||
"",
|
||||
"");
|
||||
I_Method0(void, run,
|
||||
Properties::VIRTUAL,
|
||||
__void__run,
|
||||
"Run does the graphics thread run loop. ",
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::ReleaseContext_Block_MakeCurrentOperation)
|
||||
I_DeclaringFile("osg/GraphicsThread");
|
||||
I_BaseType(osg::Operation);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <osgIntrospection/Attributes>
|
||||
|
||||
#include <osg/Object>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
|
||||
// Must undefine IN and OUT macros defined in Windows headers
|
||||
#ifdef IN
|
||||
@@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Operation)
|
||||
I_DeclaringFile("osg/OperationsThread");
|
||||
I_DeclaringFile("osg/OperationThread");
|
||||
I_VirtualBaseType(osg::Referenced);
|
||||
I_Constructor2(IN, const std::string &, name, IN, bool, keep,
|
||||
____Operation__C5_std_string_R1__bool,
|
||||
@@ -61,8 +61,10 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Operation)
|
||||
__void__setName__C5_std_string_R1);
|
||||
END_REFLECTOR
|
||||
|
||||
TYPE_NAME_ALIAS(std::set< osg::OperationThread * >, osg::OperationQueue::OperationThreads)
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::OperationQueue)
|
||||
I_DeclaringFile("osg/OperationsThread");
|
||||
I_DeclaringFile("osg/OperationThread");
|
||||
I_BaseType(osg::Referenced);
|
||||
I_Constructor0(____OperationQueue,
|
||||
"",
|
||||
@@ -107,13 +109,33 @@ BEGIN_OBJECT_REFLECTOR(osg::OperationQueue)
|
||||
__void__releaseOperationsBlock,
|
||||
"Release operations block that is used to block threads that are waiting on an empty operations queue. ",
|
||||
"");
|
||||
I_Method0(const osg::OperationQueue::OperationThreads &, getOperationThreads,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_OperationThreads_R1__getOperationThreads,
|
||||
"Get the set of OperationThreads that are sharing this OperationQueue. ",
|
||||
"");
|
||||
I_ProtectedMethod1(void, addOperationThread, IN, osg::OperationThread *, thread,
|
||||
Properties::NON_VIRTUAL,
|
||||
Properties::NON_CONST,
|
||||
__void__addOperationThread__OperationThread_P1,
|
||||
"",
|
||||
"");
|
||||
I_ProtectedMethod1(void, removeOperationThread, IN, osg::OperationThread *, thread,
|
||||
Properties::NON_VIRTUAL,
|
||||
Properties::NON_CONST,
|
||||
__void__removeOperationThread__OperationThread_P1,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(const osg::OperationQueue::OperationThreads &, OperationThreads,
|
||||
__C5_OperationThreads_R1__getOperationThreads,
|
||||
0);
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::OperationsThread)
|
||||
I_DeclaringFile("osg/OperationsThread");
|
||||
BEGIN_OBJECT_REFLECTOR(osg::OperationThread)
|
||||
I_DeclaringFile("osg/OperationThread");
|
||||
I_BaseType(osg::Referenced);
|
||||
I_BaseType(OpenThreads::Thread);
|
||||
I_Constructor0(____OperationsThread,
|
||||
I_Constructor0(____OperationThread,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setParent, IN, osg::Object *, parent,
|
||||
@@ -174,7 +196,7 @@ BEGIN_OBJECT_REFLECTOR(osg::OperationsThread)
|
||||
I_Method0(void, run,
|
||||
Properties::VIRTUAL,
|
||||
__void__run,
|
||||
"Run does the graphics thread run loop. ",
|
||||
"Run does the opertion thread run loop. ",
|
||||
"");
|
||||
I_Method1(void, setDone, IN, bool, done,
|
||||
Properties::NON_VIRTUAL,
|
||||
@@ -206,7 +228,7 @@ BEGIN_OBJECT_REFLECTOR(osg::OperationsThread)
|
||||
END_REFLECTOR
|
||||
|
||||
BEGIN_OBJECT_REFLECTOR(osg::RefBlock)
|
||||
I_DeclaringFile("osg/OperationsThread");
|
||||
I_DeclaringFile("osg/OperationThread");
|
||||
I_VirtualBaseType(osg::Referenced);
|
||||
I_BaseType(OpenThreads::Block);
|
||||
I_Constructor0(____RefBlock,
|
||||
@@ -214,3 +236,5 @@ BEGIN_OBJECT_REFLECTOR(osg::RefBlock)
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
STD_SET_REFLECTOR(std::set< osg::OperationThread * >)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <osg/GraphicsContext>
|
||||
#include <osg/Group>
|
||||
#include <osg/Node>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/PagedLOD>
|
||||
#include <osg/State>
|
||||
#include <osgDB/DatabasePager>
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
|
||||
#include <osg/BoundingSphere>
|
||||
#include <osg/CopyOp>
|
||||
#include <osg/GraphicsContext>
|
||||
#include <osg/NodeVisitor>
|
||||
#include <osg/Object>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/TransferFunction>
|
||||
#include <osgTerrain/Layer>
|
||||
#include <osgTerrain/Locator>
|
||||
@@ -196,30 +195,20 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainNode)
|
||||
__bool__getTreatBoundariesToValidDataAsDefaultValue,
|
||||
"Get whether the TeatBoundariesToValidDataAsDefaultValue hint. ",
|
||||
"");
|
||||
I_Method1(void, setOperationsThread, IN, osg::OperationsThread *, operationsThread,
|
||||
I_Method1(void, setOperationQueue, IN, osg::OperationQueue *, operations,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setOperationsThread__osg_OperationsThread_P1,
|
||||
"Set an OperationsThread to do an data initialization and update work. ",
|
||||
__void__setOperationQueue__osg_OperationQueue_P1,
|
||||
"Set an OperationQueue to do an data initialization and update work. ",
|
||||
"");
|
||||
I_Method0(osg::OperationsThread *, getOperationsThread,
|
||||
I_Method0(osg::OperationQueue *, getOperationQueue,
|
||||
Properties::NON_VIRTUAL,
|
||||
__osg_OperationsThread_P1__getOperationsThread,
|
||||
"Get the OperationsThread if one is attached, return NULL otherwise. ",
|
||||
__osg_OperationQueue_P1__getOperationQueue,
|
||||
"Get the OperationsQueue if one is attached, return NULL otherwise. ",
|
||||
"");
|
||||
I_Method0(const osg::OperationsThread *, getOperationsThread,
|
||||
I_Method0(const osg::OperationQueue *, getOperationsQueue,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_osg_OperationsThread_P1__getOperationsThread,
|
||||
"Get the const OperationsThread if one is attached, return NULL otherwise. ",
|
||||
"");
|
||||
I_Method1(void, addCompileGraphicsContext, IN, osg::GraphicsContext *, gc,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__addCompileGraphicsContext__osg_GraphicsContext_P1,
|
||||
"Add a graphics context that should be used to compile/delete OpenGL objects. ",
|
||||
"");
|
||||
I_Method1(void, removeCompileGraphicsContext, IN, osg::GraphicsContext *, gc,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__removeCompileGraphicsContext__osg_GraphicsContext_P1,
|
||||
"Removed a graphics context that should be used to compile/delete OpenGL objects. ",
|
||||
__C5_osg_OperationQueue_P1__getOperationsQueue,
|
||||
"Get the const OperationsQueue if one is attached, return NULL otherwise. ",
|
||||
"");
|
||||
I_Method0(osg::BoundingSphere, computeBound,
|
||||
Properties::VIRTUAL,
|
||||
@@ -247,9 +236,12 @@ BEGIN_OBJECT_REFLECTOR(osgTerrain::TerrainNode)
|
||||
I_SimpleProperty(osgTerrain::Locator *, Locator,
|
||||
__Locator_P1__getLocator,
|
||||
__void__setLocator__Locator_P1);
|
||||
I_SimpleProperty(osg::OperationsThread *, OperationsThread,
|
||||
__osg_OperationsThread_P1__getOperationsThread,
|
||||
__void__setOperationsThread__osg_OperationsThread_P1);
|
||||
I_SimpleProperty(osg::OperationQueue *, OperationQueue,
|
||||
__osg_OperationQueue_P1__getOperationQueue,
|
||||
__void__setOperationQueue__osg_OperationQueue_P1);
|
||||
I_SimpleProperty(const osg::OperationQueue *, OperationsQueue,
|
||||
__C5_osg_OperationQueue_P1__getOperationsQueue,
|
||||
0);
|
||||
I_SimpleProperty(bool, RequiresNormals,
|
||||
__bool__getRequiresNormals,
|
||||
__void__setRequiresNormals__bool);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/Camera>
|
||||
#include <osg/FrameStamp>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/Timer>
|
||||
#include <osgGA/EventQueue>
|
||||
#include <osgViewer/CompositeViewer>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <osg/Camera>
|
||||
#include <osg/FrameStamp>
|
||||
#include <osg/Node>
|
||||
#include <osg/OperationsThread>
|
||||
#include <osg/OperationThread>
|
||||
#include <osg/Timer>
|
||||
#include <osgViewer/GraphicsWindow>
|
||||
#include <osgViewer/Viewer>
|
||||
@@ -36,7 +36,7 @@ TYPE_NAME_ALIAS(std::vector< osg::Camera * >, osgViewer::Viewer::Cameras)
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< OpenThreads::Thread * >, osgViewer::Viewer::Threads)
|
||||
|
||||
TYPE_NAME_ALIAS(std::vector< osg::OperationsThread * >, osgViewer::Viewer::OperationsThreads)
|
||||
TYPE_NAME_ALIAS(std::vector< osg::OperationThread * >, osgViewer::Viewer::OperationThreads)
|
||||
|
||||
BEGIN_ENUM_REFLECTOR(osgViewer::Viewer::ThreadingModel)
|
||||
I_DeclaringFile("osgViewer/Viewer");
|
||||
@@ -239,9 +239,9 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
|
||||
__void__getAllThreads__Threads_R1__bool,
|
||||
"",
|
||||
"");
|
||||
I_MethodWithDefaults2(void, getOperationsThreads, IN, osgViewer::Viewer::OperationsThreads &, threads, , IN, bool, onlyActive, true,
|
||||
I_MethodWithDefaults2(void, getOperationThreads, IN, osgViewer::Viewer::OperationThreads &, threads, , IN, bool, onlyActive, true,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__getOperationsThreads__OperationsThreads_R1__bool,
|
||||
__void__getOperationThreads__OperationThreads_R1__bool,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setRealizeOperation, IN, osg::Operation *, op,
|
||||
@@ -350,5 +350,5 @@ STD_VECTOR_REFLECTOR(std::vector< OpenThreads::Thread * >)
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osg::Camera * >)
|
||||
|
||||
STD_VECTOR_REFLECTOR(std::vector< osg::OperationsThread * >)
|
||||
STD_VECTOR_REFLECTOR(std::vector< osg::OperationThread * >)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user