Changeset 6094
- Timestamp:
- 02/05/07 14:44:16
- Files:
-
- OpenSceneGraph/trunk/genwrapper.conf (modified) (1 diff)
- OpenSceneGraph/trunk/include/osg/Camera (modified) (2 diffs)
- OpenSceneGraph/trunk/include/osg/DeleteHandler (modified) (1 diff)
- OpenSceneGraph/trunk/src/osg/Camera.cpp (modified) (2 diffs)
- OpenSceneGraph/trunk/src/osgWrappers/osg/Camera.cpp (modified) (3 diffs)
- OpenSceneGraph/trunk/src/osgWrappers/osg/DeleteHandler.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/genwrapper.conf
r6061 r6094 300 300 end 301 301 302 303 configure reflector "osg::DeleteHandler" 304 object-type 305 end 306 302 307 ############################################################################# 303 308 OpenSceneGraph/trunk/include/osg/Camera
r6012 r6094 319 319 320 320 321 /** Create a operation thread for this camera.*/ 322 void createCameraThread(); 323 324 /** Assign a operation thread to the camera.*/ 325 void setCameraThread(OperationsThread* gt); 326 327 /** Get the operation thread assigned to this camera.*/ 328 OperationsThread* getCameraThread() { return _cameraThread.get(); } 329 330 /** Get the const operation thread assigned to this camera.*/ 331 const OperationsThread* getCameraThread() const { return _cameraThread.get(); } 332 333 334 321 335 /** Set the GraphicsContext that provides the mechansim for managing the OpenGL graphics context associated with this camera.*/ 322 336 void setGraphicsContext(GraphicsContext* context); … … 408 422 BufferAttachmentMap _bufferAttachmentMap; 409 423 424 ref_ptr<OperationsThread> _cameraThread; 425 410 426 ref_ptr<GraphicsContext> _graphicsContext; 427 411 428 buffered_object< ref_ptr<Object> > _renderingCache; 412 429 OpenSceneGraph/trunk/include/osg/DeleteHandler
r6090 r6094 72 72 protected: 73 73 74 DeleteHandler(const DeleteHandler&) {} 75 DeleteHandler operator = (const DeleteHandler&) { return *this; } 76 74 77 int _numFramesToRetainObjects; 75 78 int _currentFrameNumber; OpenSceneGraph/trunk/src/osg/Camera.cpp
r5882 r6094 57 57 Camera::~Camera() 58 58 { 59 setCameraThread(0); 60 59 61 if (_graphicsContext.valid()) _graphicsContext->removeCamera(this); 60 62 } … … 302 304 } 303 305 306 void Camera::createCameraThread() 307 { 308 if (!_cameraThread) 309 { 310 setCameraThread(new OperationsThread); 311 } 312 } 313 314 void Camera::setCameraThread(OperationsThread* gt) 315 { 316 if (_cameraThread==gt) return; 317 318 if (_cameraThread.valid()) 319 { 320 // need to kill the thread in some way... 321 _cameraThread->cancel(); 322 _cameraThread->setParent(0); 323 } 324 325 _cameraThread = gt; 326 327 if (_cameraThread.valid()) 328 { 329 _cameraThread->setParent(this); 330 } 331 } 332 333 OpenSceneGraph/trunk/src/osgWrappers/osg/Camera.cpp
r6016 r6094 15 15 #include <osg/CopyOp> 16 16 #include <osg/GraphicsContext> 17 #include <osg/GraphicsThread> 17 18 #include <osg/Image> 18 19 #include <osg/Matrix> … … 330 331 "Get the const BufferAttachmentMap, used to configure frame buffer objects, pbuffers and texture reads. ", 331 332 ""); 333 I_Method0(void, createCameraThread, 334 __void__createCameraThread, 335 "Create a operation thread for this camera. ", 336 ""); 337 I_Method1(void, setCameraThread, IN, osg::OperationsThread *, gt, 338 __void__setCameraThread__OperationsThread_P1, 339 "Assign a operation thread to the camera. ", 340 ""); 341 I_Method0(osg::OperationsThread *, getCameraThread, 342 __OperationsThread_P1__getCameraThread, 343 "Get the operation thread assigned to this camera. ", 344 ""); 345 I_Method0(const osg::OperationsThread *, getCameraThread, 346 __C5_OperationsThread_P1__getCameraThread, 347 "Get the const operation thread assigned to this camera. ", 348 ""); 332 349 I_Method1(void, setGraphicsContext, IN, osg::GraphicsContext *, context, 333 350 __void__setGraphicsContext__GraphicsContext_P1, … … 389 406 __BufferAttachmentMap_R1__getBufferAttachmentMap, 390 407 0); 408 I_SimpleProperty(osg::OperationsThread *, CameraThread, 409 __OperationsThread_P1__getCameraThread, 410 __void__setCameraThread__OperationsThread_P1); 391 411 I_SimpleProperty(const osg::Vec4 &, ClearColor, 392 412 __C5_Vec4_R1__getClearColor, OpenSceneGraph/trunk/src/osgWrappers/osg/DeleteHandler.cpp
r6088 r6094 26 26 TYPE_NAME_ALIAS(std::list< osg::DeleteHandler::FrameNumberObjectPair >, osg::DeleteHandler::ObjectsToDeleteList); 27 27 28 BEGIN_ VALUE_REFLECTOR(osg::DeleteHandler)28 BEGIN_OBJECT_REFLECTOR(osg::DeleteHandler) 29 29 I_ConstructorWithDefaults1(IN, int, numberOfFramesToRetainObjects, 0, 30 30 ____DeleteHandler__int,
