Added Camera's s/getCameraThread() and updated wrappers

This commit is contained in:
Robert Osfield
2007-02-05 13:44:16 +00:00
parent ea67cc7a50
commit ebd68ba063
6 changed files with 76 additions and 1 deletions

View File

@@ -318,6 +318,20 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
const BufferAttachmentMap& getBufferAttachmentMap() const { return _bufferAttachmentMap; }
/** Create a operation thread for this camera.*/
void createCameraThread();
/** Assign a operation thread to the camera.*/
void setCameraThread(OperationsThread* gt);
/** Get the operation thread assigned to this camera.*/
OperationsThread* getCameraThread() { return _cameraThread.get(); }
/** Get the const operation thread assigned to this camera.*/
const OperationsThread* getCameraThread() const { return _cameraThread.get(); }
/** Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera.*/
void setGraphicsContext(GraphicsContext* context);
@@ -407,7 +421,10 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
RenderTargetImplementation _renderTargetFallback;
BufferAttachmentMap _bufferAttachmentMap;
ref_ptr<OperationsThread> _cameraThread;
ref_ptr<GraphicsContext> _graphicsContext;
buffered_object< ref_ptr<Object> > _renderingCache;
ref_ptr<DrawCallback> _postDrawCallback;

View File

@@ -71,6 +71,9 @@ class OSG_EXPORT DeleteHandler
protected:
DeleteHandler(const DeleteHandler&) {}
DeleteHandler operator = (const DeleteHandler&) { return *this; }
int _numFramesToRetainObjects;
int _currentFrameNumber;
OpenThreads::Mutex _mutex;