#include <OSGWindow.h>

Static GL Object / Extension variables | |
| typedef std::pair< UInt32, UInt32 > | DestroyEntry |
| static Lock * | _GLObjectLock |
| static Lock * | _staticWindowLock |
| static std::vector< GLObject * > | _glObjects |
| static const Char8 * | _glLibraryName = NULL |
| static std::vector< std::string > | _registeredExtensions |
| static std::vector< std::string > | _ignoredExtensions |
| static std::vector< bool > | _commonExtensions |
| static std::vector< std::string > | _registeredFunctions |
| static std::vector< Int32 > | _registeredFunctionExts |
| static std::vector< UInt32 > | _registeredFunctionVersions |
| static std::vector< GLenum > | _registeredConstants |
| std::list< DestroyEntry > | _glObjectDestroyList |
Extension handling | |
| static void | setGLLibraryName (const Char8 *s) |
| static Int32 | getExtensionId (const Char8 *s) |
| static bool | hasCommonExtension (UInt32 id) |
| static const std::vector < std::string > & | getRegisteredExtensions (void) |
| UInt32 | getGLVersion (void) |
| bool | hasExtension (UInt32 id) |
| bool | hasExtension (const Char8 *s) |
| void * | getFunction (UInt32 id) |
| void * | getFunctionNoCheck (UInt32 id) |
| void | dumpExtensions (void) |
| GLExtensionFunction | getFunctionByName (const Char8 *s) |
| Real32 | getConstantValue (GLenum val) |
| const Vec2f & | getConstantValuev (GLenum val) |
| const std::vector< std::string > & | getRegisteredFunctions (void) |
| const std::vector< std::string > & | getExtensions (void) |
| const std::vector< std::string > & | getIgnoredExtensions (void) |
GL object handling | |
| static UInt32 | getGLObjectsSize (void) |
| static void | refreshGLObject (UInt32 id) |
| static void | refreshAllGLObjects (void) |
| static void | reinitializeGLObject (UInt32 id) |
| static void | reinitializeAllGLObjects (void) |
| static void | destroyGLObject (UInt32 id, UInt32 num=1) |
| static void | unpackIdStatus (UInt32 idstatus, UInt32 &id, GLObjectStatusE &status) |
| void | validateGLObject (UInt32 id) |
| void | validateAllGLObjects (void) |
| void | setGLObjectId (UInt32 id, UInt32 id2) |
| UInt32 | getGLObjectId (UInt32 id) |
GL object handling | |
| void | doInitRegisterGLObject (UInt32 id, UInt32 num) |
| static void | initRegisterGLObject (UInt32 id, UInt32 num) |
| static UInt32 | packIdStatus (UInt32 id, GLObjectStatusE status) |
Public Types | |
| enum | GLObjectStatusE { notused = 1, initialize, reinitialize, initialized, needrefresh, destroy, finaldestroy } |
| enum | { invalidExtensionID = 0x7fffffff, invalidFunctionID = 0x7fffffff } |
| enum | { statusShift = 3, statusMask = 7 } |
| typedef ArgsCollector< UInt32 > | GLObjectFunctorArgs |
| typedef TypedVoidFunctor2Base < PtrCallArg< Window > , GLObjectFunctorArgs > | GLObjectFunctor |
| typedef void(* | GLExtensionFunction )(void) |
| enum | { WidthFieldId = Inherited::NextFieldId, HeightFieldId = WidthFieldId + 1, PortFieldId = HeightFieldId + 1, ResizePendingFieldId = PortFieldId + 1, GlObjectEventCounterFieldId = ResizePendingFieldId + 1, GlObjectLastRefreshFieldId = GlObjectEventCounterFieldId + 1, GlObjectLastReinitializeFieldId = GlObjectLastRefreshFieldId + 1, NextFieldId = GlObjectLastReinitializeFieldId + 1 } |
| typedef WindowPtr | Ptr |
| enum | { AttachmentsFieldId = Inherited::NextFieldId, NextFieldId = AttachmentsFieldId + 1 } |
| enum | { NextFieldId = 1 } |
Public Member Functions | |
Sync | |
| virtual void | changed (BitVector whichField, UInt32 origin) |
Viewport handling | |
| void | addPort (const ViewportPtr &portP) |
| void | insertPort (UInt32 portIndex, const ViewportPtr &portP) |
| void | replacePort (UInt32 portIndex, const ViewportPtr &portP) |
| void | replacePortBy (const ViewportPtr &portP, const ViewportPtr &newPortP) |
| void | subPort (const ViewportPtr &portP) |
| void | subPort (UInt32 portIndex) |
| void | clearPorts (void) |
Size handling | |
| bool | isResizePending (void) |
| virtual void | resize (int width, int height) |
| virtual void | resizeGL (void) |
| void | setSize (UInt16 width, UInt16 height) |
Drawing | |
| virtual void | frameInit (void) |
| virtual void | frameExit (void) |
| virtual void | draw (DrawAction *action=NULL) |
| virtual void | drawAllViewports (DrawAction *action=NULL) |
| virtual void | render (RenderActionBase *action=NULL) |
| virtual void | renderAllViewports (RenderActionBase *action=NULL) |
Window system implementation functions | |
| virtual void | init (void)=0 |
| virtual void | activate (void)=0 |
| virtual void | deactivate (void)=0 |
| virtual void | swap (void)=0 |
Output | |
| virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
FieldContainer Get | |
| virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| SFUInt16 * | getSFWidth (void) |
| Get the Window::_sfWidth field. | |
| SFUInt16 * | getSFHeight (void) |
| Get the Window::_sfHeight field. | |
| MFViewportPtr * | getMFPort (void) |
| Get the Window::_mfPort field. | |
| SFBool * | getSFResizePending (void) |
| Get the Window::_sfResizePending field. | |
| UInt16 & | getWidth (void) |
| Get the value of the Window::_sfWidth field. | |
| const UInt16 & | getWidth (void) const |
| Get the value of the Window::_sfWidth field. | |
| UInt16 & | getHeight (void) |
| Get the value of the Window::_sfHeight field. | |
| const UInt16 & | getHeight (void) const |
| Get the value of the Window::_sfHeight field. | |
| bool & | getResizePending (void) |
| Get the value of the Window::_sfResizePending field. | |
| const bool & | getResizePending (void) const |
| Get the value of the Window::_sfResizePending field. | |
| ViewportPtr & | getPort (const UInt32 index) |
| Get the value of the index element the Window::_mfPort field. | |
| MFViewportPtr & | getPort (void) |
| Get the Window::_mfPort field. | |
| const MFViewportPtr & | getPort (void) const |
| Get the Window::_mfPort field. | |
Field Set | |
| void | setWidth (const UInt16 &value) |
| Set the value of the Window::_sfWidth field. | |
| void | setHeight (const UInt16 &value) |
| Set the value of the Window::_sfHeight field. | |
| void | setResizePending (const bool &value) |
| Set the value of the Window::_sfResizePending field. | |
Binary Access | |
| virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Handle Attachments | |
| void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| SFAttachmentMap * | getSFAttachments (void) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Clone | |
| virtual FieldContainerPtr | shallowCopy (void) const =0 |
Static Public Member Functions | |
Class Get | |
| static const char * | getClassname (void) |
Extension registration | |
| static UInt32 | registerExtension (const Char8 *s) |
| static void | ignoreExtensions (const Char8 *s) |
| static UInt32 | registerFunction (const Char8 *s, Int32 ext=-1, UInt32 version=0xffff) |
| static void | registerConstant (GLenum val) |
GL object registration | |
| static UInt32 | registerGLObject (GLObjectFunctor functor, UInt32 num=1) |
Class Get | |
| static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const Real32 | unknownConstant = -1e100 |
| static const osg::BitVector | WidthFieldMask |
| static const osg::BitVector | HeightFieldMask |
| static const osg::BitVector | PortFieldMask |
| static const osg::BitVector | ResizePendingFieldMask |
| static const osg::BitVector | GlObjectEventCounterFieldMask |
| static const osg::BitVector | GlObjectLastRefreshFieldMask |
| static const osg::BitVector | GlObjectLastReinitializeFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Types | |
Map for GL cvonstant handling | |
| typedef std::map< GLenum, Vec2f > | ConstHash |
Protected Member Functions | |
Constructors | |
| Window (void) | |
| Window (const Window &source) | |
Destructors | |
| virtual | ~Window (void) |
GL setup handling | |
| virtual void | setupGL (void) |
Field Get | |
| SFUInt32 * | getSFGlObjectEventCounter (void) |
| Get the Window::_sfGlObjectEventCounter field. | |
| MFUInt32 * | getMFGlObjectLastRefresh (void) |
| Get the Window::_mfGlObjectLastRefresh field. | |
| MFUInt32 * | getMFGlObjectLastReinitialize (void) |
| Get the Window::_mfGlObjectLastReinitialize field. | |
| UInt32 & | getGlObjectEventCounter (void) |
| Get the value of the Window::_sfGlObjectEventCounter field. | |
| const UInt32 & | getGlObjectEventCounter (void) const |
| Get the value of the Window::_sfGlObjectEventCounter field. | |
| UInt32 & | getGlObjectLastRefresh (UInt32 index) |
| Get the value of the index element the Window::_mfGlObjectLastRefresh field. | |
| MFUInt32 & | getGlObjectLastRefresh (void) |
| Get the Window::_mfGlObjectLastRefresh field. | |
| const MFUInt32 & | getGlObjectLastRefresh (void) const |
| Get the Window::_mfGlObjectLastRefresh field. | |
| UInt32 & | getGlObjectLastReinitialize (UInt32 index) |
| Get the value of the index element the Window::_mfGlObjectLastReinitialize field. | |
| MFUInt32 & | getGlObjectLastReinitialize (void) |
| Get the Window::_mfGlObjectLastReinitialize field. | |
| const MFUInt32 & | getGlObjectLastReinitialize (void) const |
| Get the Window::_mfGlObjectLastReinitialize field. | |
Field Set | |
| void | setGlObjectEventCounter (const UInt32 &value) |
| Set the value of the Window::_sfGlObjectEventCounter field. | |
Sync | |
| void | executeSyncImpl (WindowBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Pointer | |
| AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Fields | |
| SFUInt16 | _sfWidth |
| SFUInt16 | _sfHeight |
| MFViewportPtr | _mfPort |
| SFBool | _sfResizePending |
| SFUInt32 | _sfGlObjectEventCounter |
| MFUInt32 | _mfGlObjectLastRefresh |
| MFUInt32 | _mfGlObjectLastReinitialize |
Fields | |
| SFAttachmentMap | _attachmentMap |
Member | |
| UInt32 | _shares |
Private Types | |
| typedef WindowBase | Inherited |
Private Member Functions | |
| void | onCreate (const Window *source=NULL) |
| void | onCreateAspect (const Window *aspect0, const Window *source=NULL) |
| void | onDestroy (void) |
| Window & | operator= (const Window &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
| static void | staticAcquire (void) |
| static void | staticRelease (void) |
Private Attributes | |
| UInt32 | _windowId |
GL Object / Extension variables | |
| std::vector< UInt32 > | _lastValidate |
| std::vector< UInt32 > | _ids |
| UInt32 | _glVersion |
| std::vector< std::string > | _extensions |
| std::vector< bool > | _availExtensions |
| std::vector< void * > | _extFunctions |
| ConstHash | _availConstants |
| UInt32 | _numAvailConstants |
Static Private Attributes | |
| static std::vector< WindowPtr > | _allWindows |
| static UInt32 | _currentWindowId = 0 |
Friends | |
| class | FieldContainer |
| class | WindowBase |
GL object handling helper class | |
| class | GLObject |
Classes | |
| class | GLObject |
Definition at line 73 of file OSGWindow.h.
Definition at line 96 of file OSGWindow.h.
| typedef TypedVoidFunctor2Base<PtrCallArg<Window> , GLObjectFunctorArgs> osg::Window::GLObjectFunctor |
Definition at line 99 of file OSGWindow.h.
| typedef void(* osg::Window::GLExtensionFunction)(void) |
typedef std::map< GLenum, Vec2f > osg::Window::ConstHash [protected] |
Definition at line 331 of file OSGWindow.h.
typedef WindowBase osg::Window::Inherited [private] |
Reimplemented from osg::WindowBase.
Reimplemented in osg::ClusterWindow, osg::ClusterWindowBase, osg::MultiDisplayWindow, osg::MultiDisplayWindowBase, osg::SortFirstWindow, osg::SortFirstWindowBase, osg::PassiveWindow, osg::PassiveWindowBase, osg::XWindow, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, osg::QTWindow, and osg::QTWindowBase.
Definition at line 338 of file OSGWindow.h.
typedef std::pair<UInt32,UInt32> osg::Window::DestroyEntry [private] |
Definition at line 375 of file OSGWindow.h.
typedef WindowPtr osg::WindowBase::Ptr [inherited] |
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, and osg::GLUTWindowBase.
Definition at line 96 of file OSGWindowBase.h.
Definition at line 78 of file OSGWindow.h.
00079 { 00080 notused = 1, 00081 initialize, 00082 reinitialize, 00083 initialized, 00084 needrefresh, 00085 destroy, 00086 finaldestroy 00087 };
| anonymous enum |
Definition at line 89 of file OSGWindow.h.
00089 { invalidExtensionID = 0x7fffffff, invalidFunctionID = 0x7fffffff };
| anonymous enum |
anonymous enum [inherited] |
| WidthFieldId | |
| HeightFieldId | |
| PortFieldId | |
| ResizePendingFieldId | |
| GlObjectEventCounterFieldId | |
| GlObjectLastRefreshFieldId | |
| GlObjectLastReinitializeFieldId | |
| NextFieldId |
Definition at line 98 of file OSGWindowBase.h.
00099 { 00100 WidthFieldId = Inherited::NextFieldId, 00101 HeightFieldId = WidthFieldId + 1, 00102 PortFieldId = HeightFieldId + 1, 00103 ResizePendingFieldId = PortFieldId + 1, 00104 GlObjectEventCounterFieldId = ResizePendingFieldId + 1, 00105 GlObjectLastRefreshFieldId = GlObjectEventCounterFieldId + 1, 00106 GlObjectLastReinitializeFieldId = GlObjectLastRefreshFieldId + 1, 00107 NextFieldId = GlObjectLastReinitializeFieldId + 1 00108 };
anonymous enum [inherited] |
Definition at line 78 of file OSGAttachmentContainerImpl.h.
00079 { 00080 AttachmentsFieldId = Inherited::NextFieldId, 00081 NextFieldId = AttachmentsFieldId + 1 00082 };
anonymous enum [inherited] |
| osg::Window::Window | ( | void | ) | [protected] |
Constructor
Definition at line 277 of file OSGWindow.cpp.
00277 : 00278 Inherited( ), 00279 _windowId (0) 00280 { 00281 // only called for prototypes, no need to init them 00282 }
| osg::Window::Window | ( | const Window & | source | ) | [protected] |
Copy Constructor
Definition at line 287 of file OSGWindow.cpp.
References _glObjects, and doInitRegisterGLObject().
00287 : 00288 Inherited(source), 00289 _glObjectDestroyList(source._glObjectDestroyList), 00290 _lastValidate(source._lastValidate.size(),0), 00291 _ids(source._ids.size(),0), 00292 _extensions(), 00293 _availExtensions(), 00294 _extFunctions(), 00295 _availConstants(), 00296 _numAvailConstants(0), 00297 _windowId(0) 00298 { 00299 // mark all GL objects as not yet initialized 00300 doInitRegisterGLObject(1, _glObjects.size() - 1); 00301 }
| osg::Window::~Window | ( | void | ) | [protected, virtual] |
| static const char* osg::Window::getClassname | ( | void | ) | [inline, static] |
react to field changes
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindow, osg::MultiDisplayWindow, osg::SortFirstWindow, osg::PassiveWindow, osg::XWindow, and osg::QTWindow.
Definition at line 400 of file OSGWindow.cpp.
References osg::AttachmentContainer::changed().
Referenced by osg::XWindow::changed(), osg::PassiveWindow::changed(), and osg::ClusterWindow::changed().
00401 { 00402 Inherited::changed(whichField, origin); 00403 }
| void osg::Window::addPort | ( | const ViewportPtr & | portP | ) |
Definition at line 407 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::back(), osg::beginEditCP(), osg::endEditCP(), osg::NullFC, osg::ViewportBase::ParentFieldMask, and osg::MField< FieldTypeT, fieldNameSpace >::push_back().
00408 { 00409 if(portP != NullFC) 00410 { 00411 _mfPort.push_back(portP); 00412 // CHECK CHECK 00413 // _mfPort.back()->setParent(FieldContainer::getPtr<WindowPtr>(*this)); 00414 00415 beginEditCP(portP, Viewport::ParentFieldMask); 00416 { 00417 _mfPort.back()->setParent(WindowPtr(*this)); 00418 } 00419 endEditCP (portP, Viewport::ParentFieldMask); 00420 } 00421 }
| void osg::Window::insertPort | ( | UInt32 | portIndex, | |
| const ViewportPtr & | portP | |||
| ) |
Definition at line 423 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::beginEditCP(), osg::endEditCP(), osg::MField< FieldTypeT, fieldNameSpace >::insert(), osg::NullFC, and osg::ViewportBase::ParentFieldMask.
00424 { 00425 MFViewportPtr::iterator portIt = _mfPort.begin(); 00426 00427 if(portP != NullFC) 00428 { 00429 portIt += portIndex; 00430 00431 // CHECK CHECK 00432 // (*(_mfPort.insert(portIt, portP)))->setParent( 00433 // FieldContainer::getPtr<WindowPtr>(*this)); 00434 00435 beginEditCP(portP, Viewport::ParentFieldMask); 00436 { 00437 (*(_mfPort.insert(portIt, portP)))->setParent( 00438 WindowPtr(*this)); 00439 } 00440 endEditCP (portP, Viewport::ParentFieldMask); 00441 00442 } 00443 }
| void osg::Window::replacePort | ( | UInt32 | portIndex, | |
| const ViewportPtr & | portP | |||
| ) |
Definition at line 446 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, and osg::NullFC.
00447 { 00448 if(portP != NullFC) 00449 { 00450 _mfPort[portIndex]->setParent(NullFC); 00451 _mfPort[portIndex] = portP; 00452 // CHECK CHECK 00453 // _mfPort.getValue(portIndex)->setParent( 00454 // FieldContainer::getPtr<WindowPtr>(*this)); 00455 _mfPort[portIndex]->setParent( 00456 WindowPtr(*this)); 00457 } 00458 }
| void osg::Window::replacePortBy | ( | const ViewportPtr & | portP, | |
| const ViewportPtr & | newPortP | |||
| ) |
Definition at line 460 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::find(), and osg::NullFC.
00462 { 00463 MFViewportPtr::iterator portIt = _mfPort.find(portP); 00464 00465 if(newportP != NullFC) 00466 { 00467 if(portIt != _mfPort.end()) 00468 { 00469 (*portIt)->setParent(NullFC); 00470 (*portIt) = newportP; 00471 // CHECK CHECK 00472 // (*portIt)->setParent( 00473 // FieldContainer::getPtr<WindowPtr>(*this)); 00474 (*portIt)->setParent( 00475 WindowPtr(*this)); 00476 } 00477 } 00478 }
| void osg::Window::subPort | ( | const ViewportPtr & | portP | ) |
Definition at line 480 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::erase(), osg::MField< FieldTypeT, fieldNameSpace >::find(), and osg::NullFC.
00481 { 00482 MFViewportPtr::iterator portIt = _mfPort.find(portP); 00483 00484 if(portIt != _mfPort.end()) 00485 { 00486 (*portIt)->setParent(NullFC); 00487 00488 _mfPort.erase(portIt); 00489 } 00490 00491 }
| void osg::Window::subPort | ( | UInt32 | portIndex | ) |
Definition at line 493 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::MField< FieldTypeT, fieldNameSpace >::erase(), and osg::NullFC.
00494 { 00495 MFViewportPtr::iterator portIt = _mfPort.begin(); 00496 00497 portIt += portIndex; 00498 00499 if(portIt != _mfPort.end()) 00500 { 00501 (*portIt)->setParent(NullFC); 00502 00503 _mfPort.erase(portIt); 00504 } 00505 }
| void osg::Window::clearPorts | ( | void | ) |
Definition at line 507 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::clear(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::NullFC, and osg::subRefCP().
00508 { 00509 MFViewportPtr::iterator portIt = _mfPort.begin(); 00510 00511 while(portIt != _mfPort.end()) 00512 { 00513 (*portIt)->setParent(NullFC); 00514 00515 subRefCP(*portIt); 00516 } 00517 00518 _mfPort.clear(); 00519 }
Referenced by osg::BlendChunk::BlendChunk(), osg::PhongMaterial::createChunkMaterial(), osg::DisplayCalibration::createCMViewports(), osg::DVRIsoShader::DVRIsoShader(), osg::DVRMtexLUTShader::DVRMtexLUTShader(), osg::DVRSimpleLUTShader::DVRSimpleLUTShader(), osg::FBOViewport::FBOViewport(), osg::FragmentProgramChunk::FragmentProgramChunk(), osg::GeoPumpFactory::glextInitFunction(), osg::Particles::Particles(), osg::PhongMaterial::PhongMaterial(), osg::PointChunk::PointChunk(), osg::ProgramChunk::ProgramChunk(), osg::RegisterCombinersChunk::RegisterCombinersChunk(), osg::RenderAction::RenderAction(), osg::SHLChunk::SHLChunk(), osg::SHLParameterChunk::SHLParameterChunk(), osg::Slices::Slices(), osg::TextureChunk::TextureChunk(), and osg::VertexProgramChunk::VertexProgramChunk().
| static void osg::Window::ignoreExtensions | ( | const Char8 * | s | ) | [static] |
Referenced by frameInit().
| static UInt32 osg::Window::registerFunction | ( | const Char8 * | s, | |
| Int32 | ext = -1, |
|||
| UInt32 | version = 0xffff | |||
| ) | [static] |
Referenced by osg::BlendChunk::BlendChunk(), osg::DVRIsoShader::DVRIsoShader(), osg::DVRMtexLUTShader::DVRMtexLUTShader(), osg::DVRSimpleLUTShader::DVRSimpleLUTShader(), osg::FBOViewport::FBOViewport(), osg::GeoPumpFactory::glextInitFunction(), osg::Particles::Particles(), osg::PointChunk::PointChunk(), osg::ProgramChunk::ProgramChunk(), osg::RegisterCombinersChunk::RegisterCombinersChunk(), osg::RenderAction::RenderAction(), osg::SHLChunk::SHLChunk(), osg::Slices::Slices(), and osg::TextureChunk::TextureChunk().
| static void osg::Window::registerConstant | ( | GLenum | val | ) | [static] |
Referenced by osg::TextureChunk::TextureChunk().
| void osg::Window::setGLLibraryName | ( | const Char8 * | s | ) | [inline, static] |
Set the library name where to find OpenGL extension functions. This has to be called before the first extension function is accessed, and it's safe to call it before osgInit().
Definition at line 121 of file OSGWindow.inl.
References _glLibraryName.
00122 { 00123 _glLibraryName = s; 00124 }
| UInt32 osg::Window::getGLVersion | ( | void | ) | [inline] |
Return the version of OpenGL running in the Window in the form 0x<major><major><minor><minor>, e.g. 0x0201 for version 2.1.
Definition at line 129 of file OSGWindow.inl.
References _glVersion.
Referenced by osg::TextureChunk::activate(), osg::TextureChunk::changeFrom(), osg::TextureChunk::deactivate(), osg::TextureChunk::handleGL(), and osg::TextureChunk::handleTexture().
00130 { 00131 return _glVersion; 00132 }
Find the id of a registered extension. Return -1 if extension not registered.
Definition at line 137 of file OSGWindow.inl.
References _registeredExtensions.
00138 { 00139 std::vector<std::string>::iterator it; 00140 00141 it = std::find(_registeredExtensions.begin(), 00142 _registeredExtensions.end(), 00143 s); 00144 00145 if(it == _registeredExtensions.end()) 00146 return -1; 00147 00148 return Int32(it -_registeredExtensions.begin()); 00149 }
| bool osg::Window::hasExtension | ( | UInt32 | id | ) | [inline] |
Check if the window has the indicated extension.
Definition at line 64 of file OSGWindow.inl.
References _availExtensions.
Referenced by osg::TextureChunk::activate(), osg::SHLParameterChunk::activate(), osg::RegisterCombinersChunk::activate(), osg::ProgramChunk::activate(), osg::PointChunk::activate(), osg::DVRSimpleLUTShader::activate(), osg::CubeTextureChunk::activate(), osg::BlendChunk::activate(), osg::DVRIsoShader::activate_NVRegisterCombinerShading(), osg::TextureChunk::changeFrom(), osg::SHLParameterChunk::changeFrom(), osg::ProgramChunk::changeFrom(), osg::PointChunk::changeFrom(), osg::CubeTextureChunk::changeFrom(), osg::BlendChunk::changeFrom(), osg::TextureChunk::deactivate(), osg::ProgramChunk::deactivate(), osg::PointChunk::deactivate(), osg::CubeTextureChunk::deactivate(), osg::BlendChunk::deactivate(), osg::GeoVBO::draw(), osg::Slices::drawSlices(), GeoPump128(), GeoPump129(), osg::DVRVolume::getTextureMode(), osg::TextureChunk::handleGL(), osg::SHLChunk::handleGL(), osg::ProgramChunk::handleGL(), osg::Geometry::handleGL(), osg::CubeTextureChunk::handleGL(), osg::TextureChunk::handleTexture(), osg::TextureChunk::handleTextureShader(), osg::TextureChunk::hasMultiTexture(), osg::DVRMtexLUTShader::initCombiners(), osg::DVRMtexLUTShader::initialize(), osg::DVRVolume::initializeClipObjects(), osg::DVRSimpleLUTShader::isModeSupported(), osg::DVRIsoShader::isModeSupported(), osg::FBOViewport::render(), osg::DVRMtexLUTShader::renderSlice(), osg::DVRSimpleLUTShader::setupAlphaCorrectionRegisterCombiners(), osg::RenderAction::start(), osg::SHLChunk::updateProgram(), and osg::SHLChunk::updateProgramParameters().
00065 { 00066 return _availExtensions[id]; 00067 }
| bool osg::Window::hasExtension | ( | const Char8 * | s | ) |
Return the version of OpenGL running in the Window in the form 0x<major><major><minor><minor>, e.g. 0x0201 for version 2.1.
| bool osg::Window::hasCommonExtension | ( | UInt32 | id | ) | [inline, static] |
Check if the window has the indicated extension.
Definition at line 71 of file OSGWindow.inl.
References _commonExtensions.
Referenced by osg::PhongMaterial::createChunkMaterial(), and osg::PhongMaterial::prepareLocalChunks().
00072 { 00073 if(id >= _commonExtensions.size()) 00074 return false; 00075 00076 return _commonExtensions[id]; 00077 }
| void * osg::Window::getFunction | ( | UInt32 | id | ) | [inline] |
Get the indicated extension function. The id and the returned functions are checked for sanity and a warning is issued if there are problems. Use getFunctionNoCheck if you're sure you don't need them.
Definition at line 84 of file OSGWindow.inl.
References _extFunctions, _registeredFunctions, and FINFO.
Referenced by osg::SHLChunk::activate(), osg::RegisterCombinersChunk::activate(), osg::ProgramChunk::activate(), osg::PointChunk::activate(), osg::DVRSimpleLUTShader::activate(), osg::BlendChunk::activate(), osg::DVRIsoShader::activate_NVRegisterCombinerShading(), osg::TextureChunk::activeTexture(), osg::FBOViewport::bind(), osg::SHLChunk::changeFrom(), osg::ProgramChunk::changeFrom(), osg::PointChunk::changeFrom(), osg::BlendChunk::changeFrom(), osg::FBOViewport::checkFrameBufferStatus(), osg::SHLChunk::deactivate(), osg::ProgramChunk::deactivate(), osg::PointChunk::deactivate(), osg::DVRSimpleLUTShader::deactivate(), osg::BlendChunk::deactivate(), osg::GeoVBO::draw(), osg::Slices::drawSlices(), GeoPump128(), GeoPump129(), osg::SHLChunk::handleGL(), osg::ProgramChunk::handleGL(), osg::TextureChunk::handleTexture(), osg::DVRMtexLUTShader::initCombiners(), osg::DVRIsoShader::initCombiners_Diffuse2Combiners(), osg::DVRIsoShader::initCombiners_DiffuseMultiCombiners(), osg::DVRIsoShader::initCombiners_IsoSurfaceDiffuse(), osg::DVRIsoShader::initCombiners_IsoSurfaceSpecular(), osg::DVRIsoShader::initCombiners_Specular2Combiners(), osg::DVRIsoShader::initCombiners_SpecularMultiCombiners(), osg::FBOViewport::initialize(), osg::FBOViewport::render(), osg::DVRMtexLUTShader::renderSlice(), osg::DVRIsoShader::renderSlice_NVRegisterCombinerShading(), osg::FBOViewport::setTarget(), osg::DVRSimpleLUTShader::setupAlphaCorrectionRegisterCombiners(), osg::DVRIsoShader::setupCombinerParametersDiffuse(), osg::DVRIsoShader::setupCombinerParametersSpecular(), osg::RenderAction::start(), osg::FBOViewport::stop(), osg::GeoVBO::update(), osg::SHLChunk::updateActiveLightsMask(), osg::SHLChunk::updateCameraOrientation(), osg::SHLChunk::updateCameraPosition(), osg::SHLChunk::updateClusterId(), osg::SHLChunk::updateInvViewMatrix(), osg::SHLChunk::updateInvWorldMatrix(), osg::SHLChunk::updateLight0Active(), osg::SHLChunk::updateLight1Active(), osg::SHLChunk::updateLight2Active(), osg::SHLChunk::updateLight3Active(), osg::SHLChunk::updateLight4Active(), osg::SHLChunk::updateLight5Active(), osg::SHLChunk::updateLight6Active(), osg::SHLChunk::updateLight7Active(), osg::SHLChunk::updateOSGParameters(), osg::SHLChunk::updateParameterLocation(), osg::SHLChunk::updateParameterLocations(), osg::SHLChunk::updateParameters(), osg::SHLChunk::updateProgram(), osg::SHLChunk::updateProgramParameters(), osg::SHLChunk::updateStereoLeftEye(), osg::SHLChunk::updateTransInvWorldMatrix(), osg::SHLChunk::updateViewMatrix(), osg::SHLChunk::updateWorldMatrix(), and osg::GeoVBO::~GeoVBO().
00085 { 00086 if(id >= _extFunctions.size()) 00087 { 00088 FINFO(("Window::getFunction: illegal id %d!\n", id)); 00089 return NULL; 00090 } 00091 if(_extFunctions[id] == NULL) 00092 { 00093 FINFO(("Window::getFunction: function \"%s\" is NULL!\n", 00094 _registeredFunctions[id].c_str())); 00095 return NULL; 00096 } 00097 return _extFunctions[id]; 00098 }
| void * osg::Window::getFunctionNoCheck | ( | UInt32 | id | ) | [inline] |
Get the indicated extension function.
Definition at line 104 of file OSGWindow.inl.
References _extFunctions.
00105 { 00106 return _extFunctions[ id ]; 00107 }
| void osg::Window::dumpExtensions | ( | void | ) |
Dump all the registered extensions to std::cout.
See OpenGL Objects & Extension Handling for a description of the OpenGL object concept.
Definition at line 1128 of file OSGWindow.cpp.
References _extensions.
01129 { 01130 std::vector<std::string>::iterator it; 01131 std::cout << "GL Extensions: "; 01132 for ( it = _extensions.begin(); it != _extensions.end(); it++ ) 01133 { 01134 std::cout << it->c_str() << ", "; 01135 } 01136 std::cout << std::endl; 01137 }
| osg::Window::GLExtensionFunction osg::Window::getFunctionByName | ( | const Char8 * | s | ) |
Query OpenGL for the pointer to an extension function.
This is called internally when extension functions are first cached.
Reimplemented in osg::ClusterWindow.
Definition at line 1421 of file OSGWindow.cpp.
References _availExtensions, _glLibraryName, _registeredExtensions, FDEBUG, and FWARNING.
Referenced by frameInit().
01423 { 01424 GLExtensionFunction retval = NULL; 01425 01426 #if defined(darwin) 01427 01428 if (NSIsSymbolNameDefined(s)) 01429 { 01430 NSSymbol symbol = NSLookupAndBindSymbol(s); 01431 if (symbol != 0) 01432 retval = GLExtensionFunction(NSAddressOfSymbol(symbol)); 01433 } 01434 01435 #elif defined(WIN32) 01436 01437 retval = (void(__cdecl*)(void)) wglGetProcAddress(s); 01438 01439 #elif defined(__sgi) || defined(darwin) || defined(__hpux) || \ 01440 defined(__linux) || defined(__sun) 01441 01442 /* Workaround for multiple nVidia/Linux installation bugs, based on code by */ 01443 /* Manfred Weiler (Patch 783637) */ 01444 01445 static void (*(*__GetProcAddress)(const GLubyte *))(void) = NULL; 01446 01447 static void *libHandle = NULL; 01448 01449 if(libHandle == NULL) 01450 { 01451 libHandle = dlopen(_glLibraryName, RTLD_NOW | RTLD_LOCAL); 01452 01453 if(!libHandle) 01454 { 01455 FWARNING(("Error in dlopen: %s\n",dlerror())); 01456 abort(); 01457 } 01458 else 01459 { 01460 FDEBUG(("Opened lib %s for GL extension handling.\n", 01461 (_glLibraryName==NULL)?"(executable)":_glLibraryName)); 01462 } 01463 } 01464 01465 if(__GetProcAddress == NULL) 01466 { 01467 __GetProcAddress = (void (*(*)(const GLubyte*))()) 01468 dlsym(libHandle, "glXGetProcAddressARB"); 01469 01470 if(__GetProcAddress == NULL) 01471 { 01472 __GetProcAddress = (void (*(*)(const GLubyte*))()) 01473 dlsym(libHandle, "glXGetProcAddress"); 01474 01475 if(__GetProcAddress == NULL) 01476 { 01477 // Couldn't find it linked to the executable. Try to open 01478 // libGL.so directly. 01479 01480 dlclose(libHandle); 01481 01482 libHandle = dlopen("libGL.so", RTLD_NOW | RTLD_GLOBAL); 01483 01484 if(!libHandle) 01485 { 01486 FWARNING(("Error in dlopen: %s\n",dlerror())); 01487 abort(); 01488 } 01489 else 01490 { 01491 FDEBUG(("Opened lib libGL.so for GL extension handling.\n")); 01492 } 01493 01494 __GetProcAddress = (void (*(*)(const GLubyte*))()) 01495 dlsym(libHandle, "glXGetProcAddressARB"); 01496 01497 if(__GetProcAddress == NULL) 01498 { 01499 __GetProcAddress = (void (*(*)(const GLubyte*))()) 01500 dlsym(libHandle, "glXGetProcAddress"); 01501 } 01502 01503 if(__GetProcAddress == NULL) 01504 { 01505 FWARNING(("Neither glXGetProcAddress nor " 01506 "glXGetProcAddressARB found! Disabling all " 01507 " extensions for Window %p!\n")); 01508 _availExtensions.clear(); 01509 _availExtensions.resize(_registeredExtensions.size(), false); 01510 } 01511 } 01512 else 01513 { 01514 FDEBUG(("Using glXGetProcAddress for GL extension handling.\n")); 01515 } 01516 } 01517 else 01518 { 01519 FDEBUG(("Using glXGetProcAddressARB for GL extension handling.\n")); 01520 } 01521 } 01522 01523 if(__GetProcAddress != NULL) 01524 { 01525 retval = reinterpret_cast<GLExtensionFunction>(__GetProcAddress((const GLubyte*)s)); 01526 } 01527 else 01528 { 01529 retval = (GLExtensionFunction)(dlsym(libHandle, s)); 01530 } 01531 01532 #else 01533 01534 FWARNING(("Window::getFunctionByName: couldn't find implementation!\n" 01535 "Please contact the developers at info@opensg.org.\n")); 01536 retval = NULL; 01537 01538 #endif 01539 01540 if(retval == NULL) 01541 { 01542 FWARNING(("Window::getFunctionByName: Couldn't get function '%s' for " 01543 "Window %p.\n", s, this)); 01544 } 01545 else 01546 { 01547 FDEBUG(("Window::getFunctionByName: got function '%s' for " 01548 "Window %p at %p.\n", s, this, retval)); 01549 } 01550 01551 return retval; 01552 }
| Real32 osg::Window::getConstantValue | ( | GLenum | id | ) | [inline] |
Return the value of the registered constant, Inf if not registered or no value received yet.
Definition at line 112 of file OSGWindow.inl.
References getConstantValuev().
Referenced by osg::TextureTransformChunk::activate(), osg::TextureChunk::activate(), osg::TexGenChunk::activate(), osg::CubeTextureChunk::activate(), osg::TextureTransformChunk::changeFrom(), osg::TextureChunk::changeFrom(), osg::TexGenChunk::changeFrom(), osg::CubeTextureChunk::changeFrom(), osg::TextureTransformChunk::deactivate(), osg::TextureChunk::deactivate(), osg::TexGenChunk::deactivate(), and osg::CubeTextureChunk::deactivate().
00113 { 00114 return getConstantValuev(id)[0]; 00115 }
| const Vec2f & osg::Window::getConstantValuev | ( | GLenum | id | ) |
Return the value of the registered constant, (Inf, Inf) if not registered or no value received yet.
Definition at line 1558 of file OSGWindow.cpp.
References _availConstants, and osg::Inf.
Referenced by getConstantValue().
01559 { 01560 static Vec2f inf(Inf, Inf); 01561 01562 ConstHash::iterator it = _availConstants.find(id); 01563 01564 if(it != _availConstants.end()) 01565 return _availConstants[id]; 01566 01567 return inf; 01568 }
| const std::vector< std::string > & osg::Window::getRegisteredExtensions | ( | void | ) | [inline, static] |
Access the registered extensions.
Definition at line 160 of file OSGWindow.inl.
References _registeredExtensions.
00161 { 00162 return _registeredExtensions; 00163 }
| const std::vector< std::string > & osg::Window::getRegisteredFunctions | ( | void | ) | [inline] |
Access the registered functions.
Definition at line 167 of file OSGWindow.inl.
References _registeredFunctions.
00168 { 00169 return _registeredFunctions; 00170 }
| const std::vector< std::string > & osg::Window::getExtensions | ( | void | ) | [inline] |
Access the available extensions.
Definition at line 153 of file OSGWindow.inl.
References _extensions.
00154 { 00155 return _extensions; 00156 }
| const std::vector< std::string > & osg::Window::getIgnoredExtensions | ( | void | ) | [inline] |
Access the ignored extensions.
Definition at line 174 of file OSGWindow.inl.
References _ignoredExtensions.
00175 { 00176 return _ignoredExtensions; 00177 }
| static UInt32 osg::Window::registerGLObject | ( | GLObjectFunctor | functor, | |
| UInt32 | num = 1 | |||
| ) | [static] |
Referenced by osg::TextureChunk::changed(), osg::SHLChunk::changed(), osg::Geometry::changed(), osg::VertexProgramChunk::onCreate(), osg::TextureChunk::onCreate(), osg::Surface::onCreate(), osg::SHLChunk::onCreate(), osg::Geometry::onCreate(), osg::FragmentProgramChunk::onCreate(), and osg::CubeTextureChunk::onCreate().
| void osg::Window::validateGLObject | ( | UInt32 | id | ) |
Referenced by osg::TextureChunk::activate(), osg::SHLChunk::activate(), osg::ProgramChunk::activate(), osg::CubeTextureChunk::activate(), osg::TextureChunk::changeFrom(), osg::SHLChunk::changeFrom(), osg::ProgramChunk::changeFrom(), osg::CubeTextureChunk::changeFrom(), osg::TextureGrabBackground::clear(), osg::TextureGrabForeground::draw(), osg::Surface::drawPrimitives(), osg::Geometry::drawPrimitives(), osg::Geometry::drawVBO(), osg::FBOViewport::render(), and osg::SHLChunk::update().
| void osg::Window::validateAllGLObjects | ( | void | ) |
Definition at line 179 of file OSGWindow.inl.
References _glObjects, _ids, and SWARNING.
Referenced by osg::Geometry::createVBO(), osg::Geometry::destroyVBO(), osg::TextureChunk::handleGL(), osg::SHLChunk::handleGL(), osg::ProgramChunk::handleGL(), osg::Geometry::handleGL(), osg::CubeTextureChunk::handleGL(), and osg::SHLChunk::updateProgram().
00180 { 00181 if(osgId < _ids.size()) 00182 { 00183 _ids[osgId] = id2; 00184 } 00185 else 00186 { 00187 _ids.resize(_glObjects.size()); 00188 if(osgId < _ids.size()) 00189 _ids[osgId] = id2; 00190 else 00191 SWARNING << "Window::setGLObjectId: id (" << osgId << ") is not valid!" << std::endl; 00192 } 00193 }
Definition at line 195 of file OSGWindow.inl.
References _ids.
Referenced by osg::TextureChunk::activate(), osg::SHLChunk::activate(), osg::ProgramChunk::activate(), osg::CubeTextureChunk::activate(), osg::TextureChunk::changeFrom(), osg::SHLChunk::changeFrom(), osg::ProgramChunk::changeFrom(), osg::CubeTextureChunk::changeFrom(), osg::TextureGrabBackground::clear(), osg::SHLChunk::deactivate(), osg::ProgramChunk::deactivate(), osg::Geometry::destroyVBO(), osg::TextureGrabForeground::draw(), osg::Geometry::drawPrimitives(), osg::Geometry::drawVBO(), osg::TextureChunk::handleGL(), osg::SHLChunk::handleGL(), osg::ProgramChunk::handleGL(), osg::Geometry::handleGL(), osg::CubeTextureChunk::handleGL(), osg::FBOViewport::render(), osg::SHLChunk::update(), osg::SHLChunk::updateParameterLocations(), osg::SHLChunk::updateParameters(), osg::SHLChunk::updateProgram(), osg::SHLChunk::updateProgramParameters(), and osg::Geometry::updateVBO().
00196 { 00197 if(osgId < _ids.size()) 00198 return _ids[osgId]; 00199 00200 //SWARNING << "Window::getGLObjectId: id (" << osgId << ") is not valid!" << std::endl; 00201 return 0; 00202 }
| UInt32 osg::Window::getGLObjectsSize | ( | void | ) | [inline, static] |
Definition at line 204 of file OSGWindow.inl.
References _glObjects.
00205 { 00206 return _glObjects.size(); 00207 }
| static void osg::Window::refreshGLObject | ( | UInt32 | id | ) | [static] |
| static void osg::Window::refreshAllGLObjects | ( | void | ) | [static] |
| static void osg::Window::reinitializeGLObject | ( | UInt32 | id | ) | [static] |
Referenced by osg::TextureChunk::changed(), osg::SHLChunk::changed(), and osg::ProgramChunk::changed().
| static void osg::Window::reinitializeAllGLObjects | ( | void | ) | [static] |
| void osg::Window::unpackIdStatus | ( | UInt32 | idstatus, | |
| UInt32 & | osgId, | |||
| GLObjectStatusE & | status | |||
| ) | [inline, static] |
Unpack the id and the status from one UInt32 packed by packIdStatus
Definition at line 226 of file OSGWindow.inl.
References statusMask, and statusShift.
Referenced by osg::TextureChunk::handleGL(), osg::Surface::handleGL(), osg::SHLChunk::handleGL(), osg::ProgramChunk::handleGL(), osg::Geometry::handleGL(), osg::CubeTextureChunk::handleGL(), and osg::ProgramChunk::printCompileError().
00228 { 00229 osgId = idstatus >> statusShift; 00230 status = static_cast<GLObjectStatusE>(idstatus & statusMask); 00231 }
| bool osg::Window::isResizePending | ( | void | ) | [inline] |
Definition at line 56 of file OSGWindow.inl.
References osg::WindowBase::_sfResizePending, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by resizeGL().
00057 { 00058 return _sfResizePending.getValue(); 00059 }
| void osg::Window::resize | ( | int | width, | |
| int | height | |||
| ) | [virtual] |
Resize notifier function.
As OpenSG does not do Window System event management it needs to be notified whenever the size of a Window changes.
Definition at line 1695 of file OSGWindow.cpp.
References osg::beginEditCP(), osg::endEditCP(), osg::WindowBase::HeightFieldMask, osg::WindowBase::ResizePendingFieldMask, osg::WindowBase::setHeight(), osg::WindowBase::setResizePending(), osg::WindowBase::setWidth(), and osg::WindowBase::WidthFieldMask.
01696 { 01697 WindowPtr win(*this); 01698 beginEditCP(win, WidthFieldMask|HeightFieldMask|ResizePendingFieldMask); 01699 setWidth( width ); 01700 setHeight( height ); 01701 setResizePending( true ); 01702 endEditCP (win, WidthFieldMask|HeightFieldMask|ResizePendingFieldMask); 01703 }
| void osg::Window::resizeGL | ( | void | ) | [virtual] |
Resize function.
This function needs to be called before a Window's Viewports are rendered, to ensure that eventual pending resizes are handled correctly.
Definition at line 1711 of file OSGWindow.cpp.
References osg::beginEditCP(), osg::endEditCP(), osg::WindowBase::getHeight(), osg::WindowBase::getWidth(), isResizePending(), osg::WindowBase::ResizePendingFieldMask, and osg::WindowBase::setResizePending().
Referenced by draw(), osg::FBOViewport::render(), and osg::RenderAction::start().
01712 { 01713 if ( isResizePending () ) 01714 { 01715 glViewport( 0, 0, getWidth(), getHeight() ); 01716 WindowPtr win(*this); 01717 beginEditCP(win, ResizePendingFieldMask); 01718 setResizePending( false ); 01719 endEditCP (win, ResizePendingFieldMask); 01720 } 01721 }
Set the width and height of the Window. Only use if you really know what you're doing. In most cases resize() is a better choice.
Definition at line 50 of file OSGWindow.inl.
References osg::WindowBase::setHeight(), and osg::WindowBase::setWidth().
Referenced by osg::SortFirstWindow::clientPreSync().
| void osg::Window::frameInit | ( | void | ) | [virtual] |
Do everything that needs to be done before the Window is redrawn. This function has to be called for every frame the Window is drawn.
The convenience functions render and draw take care of it, if they are used.
The main task currently is checking and updating OpenGL extensions.
Reimplemented in osg::ClusterWindow.
Definition at line 1150 of file OSGWindow.cpp.
References _availConstants, _availExtensions, _commonExtensions, _extensions, _extFunctions, _glVersion, _ignoredExtensions, _numAvailConstants, _registeredConstants, _registeredExtensions, _registeredFunctionExts, _registeredFunctions, _registeredFunctionVersions, FDEBUG, FLOG, FPDEBUG, FWARNING, getFunctionByName(), osg::PointInterface< ValueTypeT, StorageInterfaceT >::getValues(), ignoreExtensions(), p, staticAcquire(), staticRelease(), and unknownConstant.
Referenced by draw(), render(), and setupGL().
01151 { 01152 static bool ignoreEnvDone = false; 01153 01154 if(!ignoreEnvDone) 01155 { 01156 ignoreEnvDone = true; 01157 char *p = getenv("OSG_IGNORE_EXTENSIONS"); 01158 if(p) 01159 ignoreExtensions(p); 01160 } 01161 01162 // get version/extensions and split them 01163 if(_extensions.empty()) 01164 { 01165 const char *version = 01166 reinterpret_cast<const char *>(glGetString(GL_VERSION)); 01167 01168 int major = atoi(version); 01169 int minor = atoi(strchr(version, '.') + 1); 01170 01171 _glVersion = (major << 8) + minor; 01172 01173 #ifdef __APPLE__ 01174 01175 const char* glVendor = (const char*) glGetString(GL_VENDOR); 01176 const char* glRenderer = (const char*) glGetString(GL_RENDERER); 01177 01178 // TODO; is there a better way to switch some 01179 // extentions for a specific os/vendor/renderer combo 01180 FLOG (( "GL Vendor/Renderer: %s/%s\n", glVendor, glRenderer )); 01181 01182 if ( strstr(glVendor, "ATI") && strstr(glRenderer,"X1600") ) { 01183 FWARNING (("Switch of non_power_of_two for ATI\n")); 01184 ignoreExtensions("GL_ARB_texture_non_power_of_two"); 01185 } 01186 01187 #endif // __APPLE 01188 01189 FDEBUG(("Window %p: GL Version: %4x ('%s')\n", this, 01190 _glVersion, glGetString(GL_VERSION) )); 01191 01192 FDEBUG(("Window %p: GL Extensions: %s\n", this, 01193 glGetString(GL_EXTENSIONS) )); 01194 01195 std::string foo(reinterpret_cast<const char*> 01196 (glGetString(GL_EXTENSIONS))); 01197 01198 FDEBUG(("Window %p: Ignored: ", this)); 01199 01200 for(string_token_iterator it = string_token_iterator(foo, ",. "); 01201 it != string_token_iterator(); ++it) 01202 { 01203 if(! std::binary_search(_ignoredExtensions.begin(), 01204 _ignoredExtensions.end(), 01205 *it)) 01206 { 01207 _extensions.push_back(*it); 01208 } 01209 else 01210 { 01211 FPDEBUG(("%s ", (*it).c_str())); 01212 } 01213 } 01214 FPDEBUG(("\n")); 01215 std::sort(_extensions.begin(), _extensions.end()); 01216 01217 // if we don't have any extensions, add something anyway 01218 if(_extensions.empty()) 01219 _availExtensions.resize(_registeredExtensions.size(), false); 01220 } 01221 01222 // any new extension registered ? 01223 if(_registeredExtensions.size() > _availExtensions.size()) 01224 { 01225 staticAcquire(); 01226 FDEBUG(("Window %p: exts: ", this)); 01227 01228 while(_registeredExtensions.size() > _availExtensions.size()) 01229 { 01230 UInt32 s = _availExtensions.size(); 01231 01232 /* perform a binary search over the retrieved extension strings. 01233 Push back the result as an availability flag for the extension 01234 requested by the application */ 01235 bool supported = std::binary_search( 01236 _extensions.begin(), 01237 _extensions.end(), 01238 _registeredExtensions[s]); 01239 01240 /* Is this extension ignored? */ 01241 bool ignored = std::binary_search( 01242 _ignoredExtensions.begin(), 01243 _ignoredExtensions.end(), 01244 _registeredExtensions[s]); 01245 01246 _availExtensions.push_back(supported && !ignored); 01247 01248 FPDEBUG(("%s:", _registeredExtensions[s].c_str())); 01249 if(_commonExtensions.size() <= s) 01250 { 01251 _commonExtensions.push_back(supported && !ignored); 01252 if(supported && !ignored) 01253 { 01254 FPDEBUG(("ok ")); 01255 } 01256 else if(!supported) 01257 { 01258 FPDEBUG(("NF ")); 01259 } 01260 else 01261 { 01262 FPDEBUG(("IGN ")); 01263 } 01264 } 01265 else if (!supported) 01266 { 01267 _commonExtensions[s] = false; 01268 FPDEBUG(("NF ")); 01269 } 01270 else 01271 { 01272 _commonExtensions[s] = false; 01273 FPDEBUG(("IGN ")); 01274 } 01275 } 01276 FPDEBUG(("\n")); 01277 staticRelease(); 01278 } 01279 01280 // any new functions registered ? 01281 while(_registeredFunctions.size() > _extFunctions.size()) 01282 { 01283 const Char8 *s = _registeredFunctions[_extFunctions.size()].c_str(); 01284 Int32 ext = _registeredFunctionExts[_extFunctions.size()]; 01285 UInt32 ver = _registeredFunctionVersions[_extFunctions.size()]; 01286 void *func = NULL; 01287 01288 if(ext == -1 || _availExtensions[ext] == true || _glVersion >= ver) 01289 func = (void*)getFunctionByName(s); 01290 01291 _extFunctions.push_back(func); 01292 } 01293 01294 // any new constants registered ? 01295 while(_registeredConstants.size() > _numAvailConstants) 01296 { 01297 for(std::vector<GLenum>::iterator it = _registeredConstants.begin() + 01298 _numAvailConstants; 01299 it != _registeredConstants.end(); 01300 ++it) 01301 { 01302 Vec2f val(unknownConstant, unknownConstant); 01303 glGetFloatv(*it, static_cast<GLfloat*>(val.getValues())); 01304 _availConstants[*it] = val; 01305 FDEBUG(("Window(%p): Constant 0x%x value is %.3f %.3f\n", this, 01306 *it, val[0], val[1])); 01307 } 01308 _numAvailConstants = _registeredConstants.size(); 01309 glGetError(); // clear the error flag 01310 } 01311 }
| void osg::Window::frameExit | ( | void | ) | [virtual] |
Do everything that needs to be done after the Window is redrawn. This function has to be called for every frame the Window is drawn.
The convenience functions render and draw take care of it, if they are used.
The main task currently is deleting OpenGL objects.
Reimplemented in osg::ClusterWindow.
Definition at line 1321 of file OSGWindow.cpp.
References _glObjectDestroyList, _glObjects, destroy, FDEBUG, finaldestroy, FWARNING, osg::WindowBase::getGlObjectLastReinitialize(), osg::Window::GLObject::getRefCounter(), GLenum, p, and packIdStatus().
Referenced by draw(), and render().
01322 { 01323 std::list<DestroyEntry>::iterator st,en; 01324 01325 st = _glObjectDestroyList.begin(); 01326 en = _glObjectDestroyList.end (); 01327 01328 while(st != en) 01329 { 01330 UInt32 i = st->first, n = st->second; 01331 01332 GLObject *obj = _glObjects[ i ]; 01333 01334 if(obj == NULL) 01335 { 01336 FDEBUG(("Window::frameExit: objects %d (%d) already destroyed?!?\n", 01337 i, n)); 01338 ++st; 01339 continue; 01340 } 01341 01342 UInt32 rc = obj->getRefCounter(); 01343 01344 // has the object been used in this context at all? 01345 if(getGlObjectLastReinitialize()[i] != 0) 01346 { 01347 _glObjects[i]->getFunctor().call( this, packIdStatus(i, destroy)); 01348 01349 if((rc = _glObjects[ i ]->decRefCounter()) <= 0) 01350 { 01351 // call functor with the final-flag 01352 _glObjects[i]->getFunctor().call( this, 01353 packIdStatus(i, finaldestroy)); 01354 } 01355 } 01356 01357 // if the GLObject is removed from each GL-Context, free GLObject-IDs. 01358 if(rc <= 0) 01359 { 01360 delete _glObjects[ i ]; 01361 for ( UInt32 j = 0; j < n ; j++) 01362 { 01363 _glObjects[i+j] = NULL; 01364 } 01365 } 01366 01367 ++st; 01368 } 01369 01370 _glObjectDestroyList.clear(); 01371 01372 // Test for OpenGL errors. Just a little precaution to catch 01373 // stray errors. This is the only OpenGL error test in opt mode 01374 // and it needs to be enabled using the OSG_TEST_GL_ERRORS envvar. 01375 // In debug mode it is always on. 01376 static bool inited = false; 01377 #ifndef OSG_DEBUG 01378 static bool testGLErrors = false; 01379 #else 01380 static bool testGLErrors = true; 01381 #endif 01382 01383 if(!inited) 01384 { 01385 inited = true; 01386 char *p = getenv("OSG_DEBUG"); 01387 if(p) 01388 testGLErrors = true; 01389 } 01390 01391 if(testGLErrors) 01392 { 01393 GLenum glerr; 01394 01395 while((glerr = glGetError()) != GL_NO_ERROR) 01396 { 01397 FWARNING(("Window::frameExit: Caught stray OpenGL error %s (%#x).\n", 01398 gluErrorString(glerr), 01399 glerr)); 01400 #ifndef OSG_DEBUG 01401 FWARNING(("Rerun with debug-libraries to get more accurate " 01402 "information.\n")); 01403 #endif 01404 } 01405 } 01406 01407 }
| void osg::Window::draw | ( | DrawAction * | action = NULL |
) | [virtual] |
Draw the Window using the given DrawAction.
It takes care of all initialisation and cleanup functions and contains just 6 lines of code. If you know that the correct context is active or you want to delay swaps you can just copy and manipulate it.
Definition at line 1603 of file OSGWindow.cpp.
References activate(), drawAllViewports(), frameExit(), frameInit(), resizeGL(), and swap().
01604 { 01605 activate(); 01606 frameInit(); // query recently registered GL extensions 01607 01608 resizeGL(); 01609 01610 drawAllViewports(action); 01611 01612 swap(); 01613 frameExit(); // after frame cleanup: delete GL objects, if needed 01614 }
| void osg::Window::drawAllViewports | ( | DrawAction * | action = NULL |
) | [virtual] |
Draw all the Viewports of the Window using the given DrawAction.
A simple convenience function that loops all Viewports and call their draw method.
Definition at line 1621 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::DrawActionBase::setWindow(), and SWARNING.
Referenced by draw().
01622 { 01623 MFViewportPtr::iterator portIt = _mfPort.begin(); 01624 MFViewportPtr::const_iterator portEnd = _mfPort.end(); 01625 01626 if(action != NULL) 01627 { 01628 action->setWindow(this); 01629 01630 while(portIt != portEnd) 01631 { 01632 (*portIt)->draw(action); 01633 01634 ++portIt; 01635 } 01636 } 01637 else 01638 { 01639 SWARNING << "Window::drawAllViewports: no action!" << std::endl; 01640 } 01641 }
| void osg::Window::render | ( | RenderActionBase * | action = NULL |
) | [virtual] |
Render the Window using the given RenderAction.
It takes care of all initialisation and cleanup functions and contains just 5 lines of code. If you know that the correct context is active or you want to delay swaps you can just copy and manipulate it.
Reimplemented in osg::ClusterWindow.
Definition at line 1649 of file OSGWindow.cpp.
References activate(), frameExit(), frameInit(), renderAllViewports(), and swap().
01650 { 01651 activate(); 01652 frameInit(); // query recently registered GL extensions 01653 01654 // resizeGL(); 01655 01656 renderAllViewports(action); 01657 01658 swap(); 01659 frameExit(); // after frame cleanup: delete GL objects, if needed 01660 }
| void osg::Window::renderAllViewports | ( | RenderActionBase * | action = NULL |
) | [virtual] |
Render all the Viewports of the Window using the given RenderAction.
A simple convenience function that loops all Viewports and call their draw method.
Reimplemented in osg::ClusterWindow.
Definition at line 1668 of file OSGWindow.cpp.
References osg::WindowBase::_mfPort, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::DrawActionBase::setWindow(), and SWARNING.
Referenced by render().
01669 { 01670 MFViewportPtr::iterator portIt = _mfPort.begin(); 01671 MFViewportPtr::const_iterator portEnd = _mfPort.end(); 01672 01673 if(action != NULL) 01674 { 01675 action->setWindow(this); 01676 01677 while(portIt != portEnd) 01678 { 01679 (*portIt)->render(action); 01680 ++portIt; 01681 } 01682 } 01683 else 01684 { 01685 SWARNING << "Window::renderAllViewports: no action!" << std::endl; 01686 } 01687 }
| void osg::Window::init | ( | void | ) | [pure virtual] |
Initialize the Window and its OpenGL context. This method needs to be called once after the Window has been created and its Window System-specific parameters are set.
It leaves the OpenGL context current to simplify modifying the OpenGL state.
Implemented in osg::ClusterWindow, osg::PassiveWindow, osg::XWindow, and osg::QTWindow.
| void osg::Window::activate | ( | void | ) | [pure virtual] |
Activate the Window's OpenGL context, so that OpenGL can be called.
Implemented in osg::ClusterWindow, osg::PassiveWindow, and osg::XWindow.
| void osg::Window::deactivate | ( | void | ) | [pure virtual] |
Deativate the Window's OpenGL context. OpenGL calls are no longer possible after this call.
Implemented in osg::ClusterWindow, osg::PassiveWindow, and osg::XWindow.
| void osg::Window::swap | ( | void | ) | [pure virtual] |
Swap the back and front buffers.
Implemented in osg::ClusterWindow, osg::PassiveWindow, and osg::XWindow.
output the instance for debug purposes
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindow, osg::MultiDisplayWindow, osg::SortFirstWindow, osg::PassiveWindow, osg::XWindow, and osg::QTWindow.
Definition at line 1750 of file OSGWindow.cpp.
References SLOG.
01752 { 01753 SLOG << "Dump Window NI" << std::endl; 01754 }
| void osg::Window::setupGL | ( | void | ) | [protected, virtual] |
Initialize the OpenGL state OpenSG expects. This should be called once whenever a new Window is opened.
Don't call it directly, call the Window System-specific init() method instead.
Definition at line 1577 of file OSGWindow.cpp.
References frameInit().
Referenced by osg::XWindow::init(), osg::QTWindow::init(), and osg::PassiveWindow::init().
01578 { 01579 glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); 01580 glPixelStorei( GL_PACK_ALIGNMENT, 1 ); 01581 01582 glDepthFunc( GL_LEQUAL ); 01583 glEnable( GL_DEPTH_TEST ); 01584 01585 glEnable( GL_NORMALIZE ); 01586 01587 // switch off default light 01588 GLfloat nul[4]={0,0,0,0}; 01589 glLightfv(GL_LIGHT0, GL_DIFFUSE, nul); 01590 glLightfv(GL_LIGHT0, GL_SPECULAR, nul); 01591 01592 frameInit(); // call it to setup extensions 01593 }
| UInt32 osg::Window::packIdStatus | ( | UInt32 | osgId, | |
| GLObjectStatusE | status | |||
| ) | [inline, static, protected] |
Pack the id and the status into one UInt32. Used to pass the id and status to the actual implementation functions.
Definition at line 219 of file OSGWindow.inl.
References statusShift.
Referenced by frameExit().
00220 { 00221 return (osgId << statusShift) | status; 00222 }
Referenced by operator=(), and Window().
| void osg::Window::initMethod | ( | void | ) | [static, private] |
initialize the static features of the class, e.g. action callbacks
Reimplemented in osg::ClusterWindow, osg::MultiDisplayWindow, osg::SortFirstWindow, osg::PassiveWindow, osg::XWindow, and osg::QTWindow.
Definition at line 259 of file OSGWindow.cpp.
| void osg::Window::onCreate | ( | const Window * | source = NULL |
) | [private] |
Instance initialisation
Definition at line 319 of file OSGWindow.cpp.
References _allWindows, _currentWindowId, _windowId, osg::GlobalSystemState, and osg::Running.
00320 { 00321 // Don't add the prototype instances to the list 00322 if(GlobalSystemState != Running) 00323 return; 00324 00325 _allWindows.push_back(WindowPtr(this)); 00326 00327 _windowId = ++_currentWindowId; 00328 }
Definition at line 330 of file OSGWindow.cpp.
References _currentWindowId, _windowId, osg::GlobalSystemState, and osg::Running.
00331 { 00332 // Don't add the prototype instances to the list 00333 if(GlobalSystemState != Running) 00334 return; 00335 00336 _windowId = _currentWindowId; 00337 }
| void osg::Window::onDestroy | ( | void | ) | [private, virtual] |
instance deletion
Reimplemented from osg::FieldContainer.
Definition at line 342 of file OSGWindow.cpp.
References _allWindows, _glObjects, osg::Window::GLObject::decRefCounter(), FDEBUG, and osg::WindowBase::getGlObjectLastReinitialize().
00343 { 00344 // decrement GLObjects reference counter. 00345 for(UInt32 i = 1; i < _glObjects.size(); ++i) 00346 { 00347 GLObject *obj = _glObjects[i]; 00348 if(obj == NULL) 00349 { 00350 FDEBUG(("Window::onDestroy: object %u already destroyed!\n", i)); 00351 continue; 00352 } 00353 // has the object been used in this context at all? 00354 if(i < getGlObjectLastReinitialize().size() && getGlObjectLastReinitialize()[i] != 0) 00355 { 00356 obj->decRefCounter(); 00357 // we can't call here the destroy callbacks because the 00358 // gl context is not guaranteed to be current, but destroying 00359 // the context should delete all gl objects. 00360 } 00361 } 00362 00363 std::vector<WindowPtr>::iterator it; 00364 it = std::find(_allWindows.begin(), _allWindows.end(), WindowPtr(this)); 00365 00366 // prototype window are not added to the list, so they might not be found. 00367 if(it != _allWindows.end()) 00368 _allWindows.erase( it ); 00369 }
| void osg::Window::staticAcquire | ( | void | ) | [static, private] |
Definition at line 371 of file OSGWindow.cpp.
References _staticWindowLock, osg::Lock::aquire(), osg::ThreadManager::getLock(), osg::GlobalSystemState, osg::Running, and osg::ThreadManager::the().
Referenced by frameInit().
00372 { 00373 // Is the ThreadManager initialized yet? 00374 if(GlobalSystemState != Running) 00375 return; 00376 00377 if(_staticWindowLock == NULL) 00378 { 00379 _staticWindowLock = ThreadManager::the()->getLock(NULL); 00380 } 00381 _staticWindowLock->aquire(); 00382 }
| void osg::Window::staticRelease | ( | void | ) | [static, private] |
Definition at line 384 of file OSGWindow.cpp.
References _staticWindowLock, osg::GlobalSystemState, osg::Lock::release(), and osg::Running.
Referenced by frameInit().
00385 { 00386 // Is the ThreadManager initialized yet? 00387 if(GlobalSystemState != Running) 00388 return; 00389 00390 _staticWindowLock->release(); 00391 }
| osg::Window & osg::Window::operator= | ( | const Window & | source | ) | [private] |
Assignment
Definition at line 1728 of file OSGWindow.cpp.
References _glObjects, osg::WindowBase::_mfPort, doInitRegisterGLObject(), osg::WindowBase::setHeight(), osg::MField< FieldTypeT, fieldNameSpace >::setValues(), and osg::WindowBase::setWidth().
01729 { 01730 if(this == &source) 01731 return *this; 01732 01733 // copy 01734 01735 setWidth(source.getWidth()); 01736 setHeight(source.getHeight()); 01737 _mfPort.setValues( source._mfPort.getValues() ); 01738 01739 // mark all GL objects as not yet initialized 01740 doInitRegisterGLObject(1, _glObjects.size() - 1); 01741 01742 return *this; 01743 }
| osg::FieldContainerType & osg::WindowBase::getClassType | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 58 of file OSGWindowBase.inl.
References osg::WindowBase::_type.
Referenced by osg::RemoteAspect::RemoteAspect().
00059 { 00060 return _type; 00061 }
| osg::UInt32 osg::WindowBase::getClassTypeId | ( | void | ) | [inline, static, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 65 of file OSGWindowBase.inl.
References osg::WindowBase::_type, and osg::TypeBase::getId().
00066 { 00067 return _type.getId(); 00068 }
| FieldContainerType & WindowBase::getType | ( | void | ) | [virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 172 of file OSGWindowBase.cpp.
References osg::WindowBase::_type.
00173 { 00174 return _type; 00175 }
| const FieldContainerType & WindowBase::getType | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 177 of file OSGWindowBase.cpp.
References osg::WindowBase::_type.
00178 { 00179 return _type; 00180 }
| UInt32 WindowBase::getContainerSize | ( | void | ) | const [virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 183 of file OSGWindowBase.cpp.
00184 { 00185 return sizeof(Window); 00186 }
| SFUInt16 * osg::WindowBase::getSFWidth | ( | void | ) | [inline, inherited] |
Definition at line 75 of file OSGWindowBase.inl.
References osg::WindowBase::_sfWidth.
00076 { 00077 return &_sfWidth; 00078 }
| SFUInt16 * osg::WindowBase::getSFHeight | ( | void | ) | [inline, inherited] |
Definition at line 82 of file OSGWindowBase.inl.
References osg::WindowBase::_sfHeight.
00083 { 00084 return &_sfHeight; 00085 }
| MFViewportPtr * osg::WindowBase::getMFPort | ( | void | ) | [inline, inherited] |
Definition at line 89 of file OSGWindowBase.inl.
References osg::WindowBase::_mfPort.
00090 { 00091 return &_mfPort; 00092 }
| SFBool * osg::WindowBase::getSFResizePending | ( | void | ) | [inline, inherited] |
Definition at line 96 of file OSGWindowBase.inl.
References osg::WindowBase::_sfResizePending.
00097 { 00098 return &_sfResizePending; 00099 }
| UInt16 & osg::WindowBase::getWidth | ( | void | ) | [inline, inherited] |
Definition at line 125 of file OSGWindowBase.inl.
References osg::WindowBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by osg::SortFirstWindow::clientPreSync(), resizeGL(), and osg::MultiDisplayWindow::serverRender().
00126 { 00127 return _sfWidth.getValue(); 00128 }
| const UInt16 & osg::WindowBase::getWidth | ( | void | ) | const [inline, inherited] |
Definition at line 132 of file OSGWindowBase.inl.
References osg::WindowBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00133 { 00134 return _sfWidth.getValue(); 00135 }
| UInt16 & osg::WindowBase::getHeight | ( | void | ) | [inline, inherited] |
Definition at line 146 of file OSGWindowBase.inl.
References osg::WindowBase::_sfHeight, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
Referenced by osg::SortFirstWindow::clientPreSync(), resizeGL(), and osg::MultiDisplayWindow::serverRender().
00147 { 00148 return _sfHeight.getValue(); 00149 }
| const UInt16 & osg::WindowBase::getHeight | ( | void | ) | const [inline, inherited] |
Definition at line 153 of file OSGWindowBase.inl.
References osg::WindowBase::_sfHeight, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00154 { 00155 return _sfHeight.getValue(); 00156 }
| bool & osg::WindowBase::getResizePending | ( | void | ) | [inline, inherited] |
Definition at line 167 of file OSGWindowBase.inl.
References osg::WindowBase::_sfResizePending, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00168 { 00169 return _sfResizePending.getValue(); 00170 }
| const bool & osg::WindowBase::getResizePending | ( | void | ) | const [inline, inherited] |
Definition at line 174 of file OSGWindowBase.inl.
References osg::WindowBase::_sfResizePending, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00175 { 00176 return _sfResizePending.getValue(); 00177 }
| ViewportPtr & osg::WindowBase::getPort | ( | const UInt32 | index | ) | [inline, inherited] |
Definition at line 210 of file OSGWindowBase.inl.
References osg::WindowBase::_mfPort.
Referenced by osg::FBOViewport::render().
00211 { 00212 return _mfPort[index]; 00213 }
| MFViewportPtr & osg::WindowBase::getPort | ( | void | ) | [inline, inherited] |
Definition at line 217 of file OSGWindowBase.inl.
References osg::WindowBase::_mfPort.
Referenced by osg::MultiDisplayWindow::clientInit(), osg::SortFirstWindow::clientPreSync(), osg::SortFirstWindow::clientSwap(), osg::SortFirstWindow::serverRender(), and osg::MultiDisplayWindow::serverRender().
00218 { 00219 return _mfPort; 00220 }
| const MFViewportPtr & osg::WindowBase::getPort | ( | void | ) | const [inline, inherited] |
Definition at line 224 of file OSGWindowBase.inl.
References osg::WindowBase::_mfPort.
00225 { 00226 return _mfPort; 00227 }
| void osg::WindowBase::setWidth | ( | const UInt16 & | value | ) | [inline, inherited] |
Definition at line 139 of file OSGWindowBase.inl.
References osg::WindowBase::_sfWidth, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by operator=(), resize(), osg::MultiDisplayWindow::serverRender(), and setSize().
| void osg::WindowBase::setHeight | ( | const UInt16 & | value | ) | [inline, inherited] |
Definition at line 160 of file OSGWindowBase.inl.
References osg::WindowBase::_sfHeight, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by operator=(), resize(), osg::MultiDisplayWindow::serverRender(), and setSize().
| void osg::WindowBase::setResizePending | ( | const bool & | value | ) | [inline, inherited] |
Definition at line 181 of file OSGWindowBase.inl.
References osg::WindowBase::_sfResizePending, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
Referenced by resize(), and resizeGL().
00182 { 00183 _sfResizePending.setValue(value); 00184 }
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 260 of file OSGWindowBase.cpp.
References osg::WindowBase::_mfGlObjectLastRefresh, osg::WindowBase::_mfGlObjectLastReinitialize, osg::WindowBase::_mfPort, osg::WindowBase::_sfGlObjectEventCounter, osg::WindowBase::_sfHeight, osg::WindowBase::_sfResizePending, osg::WindowBase::_sfWidth, osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::SField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::AttachmentContainer::getBinSize(), osg::WindowBase::GlObjectEventCounterFieldMask, osg::WindowBase::GlObjectLastRefreshFieldMask, osg::WindowBase::GlObjectLastReinitializeFieldMask, osg::WindowBase::HeightFieldMask, osg::FieldBits::NoField, osg::WindowBase::PortFieldMask, osg::WindowBase::ResizePendingFieldMask, and osg::WindowBase::WidthFieldMask.
Referenced by osg::XWindowBase::getBinSize(), osg::WIN32WindowBase::getBinSize(), osg::PassiveWindowBase::getBinSize(), osg::GLUTWindowBase::getBinSize(), and osg::ClusterWindowBase::getBinSize().
00261 { 00262 UInt32 returnValue = Inherited::getBinSize(whichField); 00263 00264 if(FieldBits::NoField != (WidthFieldMask & whichField)) 00265 { 00266 returnValue += _sfWidth.getBinSize(); 00267 } 00268 00269 if(FieldBits::NoField != (HeightFieldMask & whichField)) 00270 { 00271 returnValue += _sfHeight.getBinSize(); 00272 } 00273 00274 if(FieldBits::NoField != (PortFieldMask & whichField)) 00275 { 00276 returnValue += _mfPort.getBinSize(); 00277 } 00278 00279 if(FieldBits::NoField != (ResizePendingFieldMask & whichField)) 00280 { 00281 returnValue += _sfResizePending.getBinSize(); 00282 } 00283 00284 if(FieldBits::NoField != (GlObjectEventCounterFieldMask & whichField)) 00285 { 00286 returnValue += _sfGlObjectEventCounter.getBinSize(); 00287 } 00288 00289 if(FieldBits::NoField != (GlObjectLastRefreshFieldMask & whichField)) 00290 { 00291 returnValue += _mfGlObjectLastRefresh.getBinSize(); 00292 } 00293 00294 if(FieldBits::NoField != (GlObjectLastReinitializeFieldMask & whichField)) 00295 { 00296 returnValue += _mfGlObjectLastReinitialize.getBinSize(); 00297 } 00298 00299 00300 return returnValue; 00301 }
| void WindowBase::copyToBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 303 of file OSGWindowBase.cpp.
References osg::WindowBase::_mfGlObjectLastRefresh, osg::WindowBase::_mfGlObjectLastReinitialize, osg::WindowBase::_mfPort, osg::WindowBase::_sfGlObjectEventCounter, osg::WindowBase::_sfHeight, osg::WindowBase::_sfResizePending, osg::WindowBase::_sfWidth, osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::SField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::AttachmentContainer::copyToBin(), osg::WindowBase::GlObjectEventCounterFieldMask, osg::WindowBase::GlObjectLastRefreshFieldMask, osg::WindowBase::GlObjectLastReinitializeFieldMask, osg::WindowBase::HeightFieldMask, osg::FieldBits::NoField, osg::WindowBase::PortFieldMask, osg::WindowBase::ResizePendingFieldMask, and osg::WindowBase::WidthFieldMask.
Referenced by osg::XWindowBase::copyToBin(), osg::WIN32WindowBase::copyToBin(), osg::PassiveWindowBase::copyToBin(), osg::GLUTWindowBase::copyToBin(), and osg::ClusterWindowBase::copyToBin().
00305 { 00306 Inherited::copyToBin(pMem, whichField); 00307 00308 if(FieldBits::NoField != (WidthFieldMask & whichField)) 00309 { 00310 _sfWidth.copyToBin(pMem); 00311 } 00312 00313 if(FieldBits::NoField != (HeightFieldMask & whichField)) 00314 { 00315 _sfHeight.copyToBin(pMem); 00316 } 00317 00318 if(FieldBits::NoField != (PortFieldMask & whichField)) 00319 { 00320 _mfPort.copyToBin(pMem); 00321 } 00322 00323 if(FieldBits::NoField != (ResizePendingFieldMask & whichField)) 00324 { 00325 _sfResizePending.copyToBin(pMem); 00326 } 00327 00328 if(FieldBits::NoField != (GlObjectEventCounterFieldMask & whichField)) 00329 { 00330 _sfGlObjectEventCounter.copyToBin(pMem); 00331 } 00332 00333 if(FieldBits::NoField != (GlObjectLastRefreshFieldMask & whichField)) 00334 { 00335 _mfGlObjectLastRefresh.copyToBin(pMem); 00336 } 00337 00338 if(FieldBits::NoField != (GlObjectLastReinitializeFieldMask & whichField)) 00339 { 00340 _mfGlObjectLastReinitialize.copyToBin(pMem); 00341 } 00342 00343 00344 }
| void WindowBase::copyFromBin | ( | BinaryDataHandler & | pMem, | |
| const BitVector & | whichField | |||
| ) | [virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 346 of file OSGWindowBase.cpp.
References osg::WindowBase::_mfGlObjectLastRefresh, osg::WindowBase::_mfGlObjectLastReinitialize, osg::WindowBase::_mfPort, osg::WindowBase::_sfGlObjectEventCounter, osg::WindowBase::_sfHeight, osg::WindowBase::_sfResizePending, osg::WindowBase::_sfWidth, osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::SField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::AttachmentContainer::copyFromBin(), osg::WindowBase::GlObjectEventCounterFieldMask, osg::WindowBase::GlObjectLastRefreshFieldMask, osg::WindowBase::GlObjectLastReinitializeFieldMask, osg::WindowBase::HeightFieldMask, osg::FieldBits::NoField, osg::WindowBase::PortFieldMask, osg::WindowBase::ResizePendingFieldMask, and osg::WindowBase::WidthFieldMask.
Referenced by osg::XWindowBase::copyFromBin(), osg::WIN32WindowBase::copyFromBin(), osg::PassiveWindowBase::copyFromBin(), osg::GLUTWindowBase::copyFromBin(), and osg::ClusterWindowBase::copyFromBin().
00348 { 00349 Inherited::copyFromBin(pMem, whichField); 00350 00351 if(FieldBits::NoField != (WidthFieldMask & whichField)) 00352 { 00353 _sfWidth.copyFromBin(pMem); 00354 } 00355 00356 if(FieldBits::NoField != (HeightFieldMask & whichField)) 00357 { 00358 _sfHeight.copyFromBin(pMem); 00359 } 00360 00361 if(FieldBits::NoField != (PortFieldMask & whichField)) 00362 { 00363 _mfPort.copyFromBin(pMem); 00364 } 00365 00366 if(FieldBits::NoField != (ResizePendingFieldMask & whichField)) 00367 { 00368 _sfResizePending.copyFromBin(pMem); 00369 } 00370 00371 if(FieldBits::NoField != (GlObjectEventCounterFieldMask & whichField)) 00372 { 00373 _sfGlObjectEventCounter.copyFromBin(pMem); 00374 } 00375 00376 if(FieldBits::NoField != (GlObjectLastRefreshFieldMask & whichField)) 00377 { 00378 _mfGlObjectLastRefresh.copyFromBin(pMem); 00379 } 00380 00381 if(FieldBits::NoField != (GlObjectLastReinitializeFieldMask & whichField)) 00382 { 00383 _mfGlObjectLastReinitialize.copyFromBin(pMem); 00384 } 00385 00386 00387 }
| SFUInt32 * osg::WindowBase::getSFGlObjectEventCounter | ( | void | ) | [inline, protected, inherited] |
Definition at line 103 of file OSGWindowBase.inl.
References osg::WindowBase::_sfGlObjectEventCounter.
00104 { 00105 return &_sfGlObjectEventCounter; 00106 }
| MFUInt32 * osg::WindowBase::getMFGlObjectLastRefresh | ( | void | ) | [inline, protected, inherited] |
Definition at line 110 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastRefresh.
00111 { 00112 return &_mfGlObjectLastRefresh; 00113 }
| MFUInt32 * osg::WindowBase::getMFGlObjectLastReinitialize | ( | void | ) | [inline, protected, inherited] |
Definition at line 117 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastReinitialize.
00118 { 00119 return &_mfGlObjectLastReinitialize; 00120 }
| UInt32 & osg::WindowBase::getGlObjectEventCounter | ( | void | ) | [inline, protected, inherited] |
Definition at line 188 of file OSGWindowBase.inl.
References osg::WindowBase::_sfGlObjectEventCounter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00189 { 00190 return _sfGlObjectEventCounter.getValue(); 00191 }
| const UInt32 & osg::WindowBase::getGlObjectEventCounter | ( | void | ) | const [inline, protected, inherited] |
Definition at line 195 of file OSGWindowBase.inl.
References osg::WindowBase::_sfGlObjectEventCounter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().
00196 { 00197 return _sfGlObjectEventCounter.getValue(); 00198 }
Definition at line 231 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastRefresh.
00232 { 00233 return _mfGlObjectLastRefresh[index]; 00234 }
| MFUInt32 & osg::WindowBase::getGlObjectLastRefresh | ( | void | ) | [inline, protected, inherited] |
Definition at line 238 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastRefresh.
00239 { 00240 return _mfGlObjectLastRefresh; 00241 }
| const MFUInt32 & osg::WindowBase::getGlObjectLastRefresh | ( | void | ) | const [inline, protected, inherited] |
Definition at line 245 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastRefresh.
00246 { 00247 return _mfGlObjectLastRefresh; 00248 }
| UInt32 & osg::WindowBase::getGlObjectLastReinitialize | ( | UInt32 | index | ) | [inline, protected, inherited] |
Definition at line 252 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastReinitialize.
00253 { 00254 return _mfGlObjectLastReinitialize[index]; 00255 }
| MFUInt32 & osg::WindowBase::getGlObjectLastReinitialize | ( | void | ) | [inline, protected, inherited] |
Definition at line 259 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastReinitialize.
Referenced by frameExit(), and onDestroy().
00260 { 00261 return _mfGlObjectLastReinitialize; 00262 }
| const MFUInt32 & osg::WindowBase::getGlObjectLastReinitialize | ( | void | ) | const [inline, protected, inherited] |
Definition at line 266 of file OSGWindowBase.inl.
References osg::WindowBase::_mfGlObjectLastReinitialize.
00267 { 00268 return _mfGlObjectLastReinitialize; 00269 }
| void osg::WindowBase::setGlObjectEventCounter | ( | const UInt32 & | value | ) | [inline, protected, inherited] |
Definition at line 202 of file OSGWindowBase.inl.
References osg::WindowBase::_sfGlObjectEventCounter, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
00203 { 00204 _sfGlObjectEventCounter.setValue(value); 00205 }
| void WindowBase::executeSyncImpl | ( | WindowBase * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 390 of file OSGWindowBase.cpp.
References osg::WindowBase::_mfGlObjectLastRefresh, osg::WindowBase::_mfGlObjectLastReinitialize, osg::WindowBase::_mfPort, osg::WindowBase::_sfGlObjectEventCounter, osg::WindowBase::_sfHeight, osg::WindowBase::_sfResizePending, osg::WindowBase::_sfWidth, osg::AttachmentContainer::executeSyncImpl(), osg::WindowBase::GlObjectEventCounterFieldMask, osg::WindowBase::GlObjectLastRefreshFieldMask, osg::WindowBase::GlObjectLastReinitializeFieldMask, osg::WindowBase::HeightFieldMask, osg::FieldBits::NoField, osg::WindowBase::PortFieldMask, osg::WindowBase::ResizePendingFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::syncWith(), osg::SField< FieldTypeT, fieldNameSpace >::syncWith(), and osg::WindowBase::WidthFieldMask.
Referenced by osg::WindowBase::executeSync(), osg::XWindowBase::executeSyncImpl(), osg::WIN32WindowBase::executeSyncImpl(), osg::PassiveWindowBase::executeSyncImpl(), osg::GLUTWindowBase::executeSyncImpl(), and osg::ClusterWindowBase::executeSyncImpl().
00392 { 00393 00394 Inherited::executeSyncImpl(pOther, whichField); 00395 00396 if(FieldBits::NoField != (WidthFieldMask & whichField)) 00397 _sfWidth.syncWith(pOther->_sfWidth); 00398 00399 if(FieldBits::NoField != (HeightFieldMask & whichField)) 00400 _sfHeight.syncWith(pOther->_sfHeight); 00401 00402 if(FieldBits::NoField != (PortFieldMask & whichField)) 00403 _mfPort.syncWith(pOther->_mfPort); 00404 00405 if(FieldBits::NoField != (ResizePendingFieldMask & whichField)) 00406 _sfResizePending.syncWith(pOther->_sfResizePending); 00407 00408 if(FieldBits::NoField != (GlObjectEventCounterFieldMask & whichField)) 00409 _sfGlObjectEventCounter.syncWith(pOther->_sfGlObjectEventCounter); 00410 00411 if(FieldBits::NoField != (GlObjectLastRefreshFieldMask & whichField)) 00412 _mfGlObjectLastRefresh.syncWith(pOther->_mfGlObjectLastRefresh); 00413 00414 if(FieldBits::NoField != (GlObjectLastReinitializeFieldMask & whichField)) 00415 _mfGlObjectLastReinitialize.syncWith(pOther->_mfGlObjectLastReinitialize); 00416 00417 00418 }
| void AttachmentContainer::executeSyncImpl | ( | AttachmentContainer * | pOther, | |
| const BitVector & | whichField | |||
| ) | [protected, inherited] |
Definition at line 316 of file OSGAttachmentContainer.cpp.
References osg::AttachmentContainer::_attachmentMap, osg::AttachmentContainer::AttachmentsFieldMask, osg::FieldContainer::executeSyncImpl(), osg::FieldBits::NoField, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith().
Referenced by osg::AttachmentContainer::executeSync(), osg::WindowBase::executeSyncImpl(), osg::ViewportBase::executeSyncImpl(), osg::ShaderParameterBase::executeSyncImpl(), osg::Node::executeSyncImpl(), osg::NodeCore::executeSyncImpl(), osg::MaterialBase::executeSyncImpl(), osg::ImageComposerBase::executeSyncImpl(), osg::ImageBase::executeSyncImpl(), osg::ForegroundBase::executeSyncImpl(), osg::DisplayFilterBase::executeSyncImpl(), osg::DisplayCalibrationBase::executeSyncImpl(), osg::CameraBase::executeSyncImpl(), and osg::BackgroundBase::executeSyncImpl().
00319 { 00320 Inherited::executeSyncImpl(pOther, whichField); 00321 00322 if (FieldBits::NoField != (AttachmentsFieldMask & whichField)) 00323 { 00324 _attachmentMap.syncWith(pOther->_attachmentMap); 00325 } 00326 }
| void osg::FieldContainer::executeSyncImpl | ( | FieldContainer * | pOther, | |
| const BitVector & | whichField | |||
| ) | [inline, protected, inherited] |
Definition at line 333 of file OSGFieldContainerImpl.inl.
Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().
| void WindowBase::executeSync | ( | FieldContainer & | other, | |
| const BitVector & | whichField | |||
| ) | [protected, virtual, inherited] |
Reimplemented from osg::AttachmentContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, and osg::QTWindowBase.
Definition at line 190 of file OSGWindowBase.cpp.
References osg::WindowBase::executeSyncImpl().
00192 { 00193 this->executeSyncImpl((WindowBase *) &other, whichField); 00194 }
| void AttachmentContainer::addAttachment | ( | const AttachmentPtr & | fieldContainerP, | |
| UInt16 | binding = 0 | |||
| ) | [inherited] |
Definition at line 84 of file OSGAttachmentContainer.cpp.
References osg::addRefCP(), osg::beginEditCP(), osg::endEditCP(), osg::NullFC, and osg::subRefCP().
Referenced by osg::AttachmentContainer::AttachmentContainer(), osg::Node::onCreate(), and osg::Image::setAttachmentField().
00086 { 00087 UInt32 key; 00088 00089 if(fieldContainerP == NullFC) 00090 return; 00091 00092 key = (UInt32 (fieldContainerP->getGroupId()) << 16) | binding; 00093 00094 addRefCP(fieldContainerP); 00095 00096 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00097 { 00098 fieldContainerP->addParent(getPtr()); 00099 } 00100 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00101 00102 AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key); 00103 00104 if(fcI != _attachmentMap.getValue().end()) 00105 { 00106 beginEditCP((*fcI).second, Attachment::ParentsFieldMask); 00107 { 00108 (*fcI).second->subParent(getPtr()); 00109 } 00110 endEditCP ((*fcI).second, Attachment::ParentsFieldMask); 00111 00112 subRefCP((*fcI).second); 00113 00114 (*fcI).second = fieldContainerP; 00115 } 00116 else 00117 { 00118 _attachmentMap.getValue()[key] = fieldContainerP; 00119 } 00120 }
| void AttachmentContainer::subAttachment | ( | const AttachmentPtr & | fieldContainerP, | |
| UInt16 | binding = 0 | |||
| ) | [inherited] |
Definition at line 122 of file OSGAttachmentContainer.cpp.
References osg::AttachmentContainer::_attachmentMap, osg::beginEditCP(), osg::endEditCP(), osg::AttachmentContainer::getPtr(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, osg::Attachment::ParentsFieldMask, and osg::subRefCP().
00124 { 00125 UInt32 key; 00126 00127 AttachmentMap::iterator fcI; 00128 00129 if(fieldContainerP == NullFC) 00130 return; 00131 00132 key = (UInt32(fieldContainerP->getGroupId()) << 16) | binding; 00133 00134 fcI = _attachmentMap.getValue().find(key); 00135 00136 if(fcI != _attachmentMap.getValue().end()) 00137 { 00138 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00139 { 00140 (*fcI).second->subParent(getPtr()); 00141 } 00142 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00143 00144 subRefCP((*fcI).second); 00145 00146 _attachmentMap.getValue().erase(fcI); 00147 } 00148 }
| AttachmentPtr AttachmentContainer::findAttachment | ( | UInt32 | groupId, | |
| UInt16 | binding = 0 | |||
| ) | [inherited] |
Definition at line 150 of file OSGAttachmentContainer.cpp.
References osg::AttachmentContainer::_attachmentMap, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::NullFC.
Referenced by osg::Image::findAttachmentField(), and osg::Image::setAttachmentField().
00152 { 00153 UInt32 key = (UInt32(groupId) << 16) | binding; 00154 00155 AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key); 00156 00157 if(fcI == _attachmentMap.getValue().end()) 00158 { 00159 return NullFC; 00160 } 00161 else 00162 { 00163 return (*fcI).second; 00164 } 00165 }
| AttachmentPtr osg::AttachmentContainer::findAttachment | ( | const FieldContainerType & | type, | |
| UInt16 | binding = 0 | |||
| ) | [inline, inherited] |
Definition at line 57 of file OSGAttachmentContainerImpl.inl.
00060 { 00061 return findAttachment(type.getGroupId(), binding); 00062 }
| SFAttachmentMap * AttachmentContainer::getSFAttachments | ( | void | ) | [inherited] |
Field Access
Definition at line 170 of file OSGAttachmentContainer.cpp.
References osg::AttachmentContainer::_attachmentMap.
00171 { 00172 return &_attachmentMap; 00173 }
| AttachmentContainerPtr AttachmentContainer::getPtr | ( | void | ) | [protected, inherited] |
Definition at line 352 of file OSGAttachmentContainer.cpp.
Referenced by osg::FileGrabForeground::draw(), osg::FBOViewport::render(), osg::AttachmentContainer::subAttachment(), and osg::AttachmentContainer::~AttachmentContainer().
00353 { 00354 return AttachmentContainerPtr(*this); 00355 }
| UInt16 osg::FieldContainer::getClassGroupId | ( | void | ) | [inline, static, inherited] |
Definition at line 71 of file OSGFieldContainerImpl.inl.
References osg::FieldContainer::_type, and osg::FieldContainerType::getGroupId().
00072 { 00073 return _type.getGroupId(); 00074 }
| UInt32 osg::FieldContainer::getTypeId | ( | void | ) | const [inline, inherited] |
Definition at line 77 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getId(), and osg::FieldContainer::getType().
Referenced by osg::TextureChunk::changeFrom(), and osg::CubeTextureChunk::changeFrom().
00078 { 00079 return getType().getId(); 00080 }
| UInt16 osg::FieldContainer::getGroupId | ( | void | ) | const [inline, inherited] |
Definition at line 83 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::getGroupId(), and osg::FieldContainer::getType().
Referenced by osg::fcptrAttributeMap(), osg::Image::setAttachmentField(), and osg::stringAttributeMap().
00084 { 00085 return getType().getGroupId(); 00086 }
| const Char8 * osg::FieldContainer::getTypeName | ( | void | ) | const [inline, inherited] |
Definition at line 89 of file OSGFieldContainerImpl.inl.
References osg::TypeBase::getCName(), and osg::FieldContainer::getType().
00090 { 00091 return getType().getCName(); 00092 }
Generic Field Access
Definition at line 95 of file OSGFieldContainerImpl.inl.
References osg::FieldDescription::getField(), osg::FieldContainerType::getFieldDescription(), and osg::FieldContainer::getType().
Referenced by osg::QFCItem::expand(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::QFieldViewBase::getFieldPtr(), osg::QFieldEditorBase::getFieldPtr(), osg::getParentsField(), and osg::QFCItem::setup().
00096 { 00097 const FieldDescription *desc = getType().getFieldDescription(fieldId); 00098 00099 return desc ? desc->getField(*this) : NULL; 00100 }
Generic Field Access
Definition at line 103 of file OSGFieldContainerImpl.inl.
References osg::FieldContainerType::findFieldDescription(), osg::FieldDescription::getField(), and osg::FieldContainer::getType().
00104 { 00105 const FieldDescription *desc =getType().findFieldDescription(fieldName); 00106 00107 return desc ? desc->getField(*this) : NULL; 00108 }
| virtual FieldContainerPtr osg::FieldContainer::shallowCopy | ( | void | ) | const [pure virtual, inherited] |
Implemented in osg::RenderOptionsBase, osg::ClusterWindowBase, osg::DisplayCalibrationBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::FCPtrAttributeMapBase, osg::StringAttributeMapBase, osg::Attachment, osg::SimpleAttachment< AttachmentDescT >, osg::Node, osg::ImageBase, osg::ChunkMaterialBase, osg::FresnelMaterialBase, osg::MultiPassMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, osg::SwitchMaterialBase, osg::GeometryBase, osg::SlicesBase, osg::ParticlesBase, osg::DVRAppearanceBase, osg::DVRClipGeometryBase, osg::DVRClipObjectsBase, osg::DVRGeometryBase, osg::DVRIsoShaderBase, osg::DVRIsoSurfaceBase, osg::DVRLookupTableBase, osg::DVRMtexLUTShaderBase, osg::DVRSimpleLUTShaderBase, osg::DVRSimpleShaderBase, osg::DVRVolumeBase, osg::DVRVolumeTextureBase, osg::FatBorderChunkBase, osg::SurfaceBase, osg::GroupBase, osg::DirectionalLightBase, osg::LightEnvBase, osg::PointLightBase, osg::SpotLightBase, osg::BillboardBase, osg::ClipPlaneBase, osg::ComponentTransformBase, osg::DistanceLODBase, osg::InlineBase, osg::InverseTransformBase, osg::MaterialGroupBase, osg::MaterialPoolBase, osg::ProxyGroupBase, osg::ScreenGroupBase, osg::StateSortingGroupBase, osg::SwitchBase, osg::TransformBase, osg::BlendChunkBase, osg::ClipPlaneChunkBase, osg::ColorMaskChunkBase, osg::CubeTextureChunkBase, osg::DepthChunkBase, osg::FragmentProgramChunkBase, osg::LightChunkBase, osg::LightModelChunkBase, osg::LineChunkBase, osg::LogicOpChunkBase, osg::MaterialChunkBase, osg::PointChunkBase, osg::PolygonChunkBase, osg::RegisterCombinersChunkBase, osg::SClipPlaneChunkBase, osg::StateBase, osg::StencilChunkBase, osg::TexGenChunkBase, osg::TextureChunkBase, osg::TextureTransformChunkBase, osg::TransformChunkBase, osg::TwoSidedLightingChunkBase, osg::VertexProgramChunkBase, osg::GraphicStatisticsForegroundBase, osg::SimpleStatisticsForegroundBase, osg::ColorBufferViewportBase, osg::ColorDisplayFilterBase, osg::DepthClearBackgroundBase, osg::DisplayFilterForegroundBase, osg::DistortionDisplayFilterBase, osg::FBOViewportBase, osg::FileGrabForegroundBase, osg::GrabForegroundBase, osg::GradientBackgroundBase, osg::ImageBackgroundBase, osg::ImageForegroundBase, osg::MatrixCameraBase, osg::MatrixCameraDecoratorBase, osg::OffCenterPerspectiveCameraBase, osg::OrthographicCameraBase, osg::PassiveBackgroundBase, osg::PassiveViewportBase, osg::PassiveWindowBase, osg::PerspectiveCameraBase, osg::PolygonBackgroundBase, osg::PolygonForegroundBase, osg::ProjectionCameraDecoratorBase, osg::ResolutionDisplayFilterBase, osg::ShearedStereoCameraDecoratorBase, osg::SkyBackgroundBase, osg::SolidBackgroundBase, osg::StereoBufferViewportBase, osg::TextureBackgroundBase, osg::TextureGrabBackgroundBase, osg::TextureGrabForegroundBase, osg::TileCameraDecoratorBase, osg::ViewportBase, osg::ShaderParameterBoolBase, osg::ShaderParameterIntBase, osg::ShaderParameterMatrixBase, osg::ShaderParameterMIntBase, osg::ShaderParameterMMatrixBase, osg::ShaderParameterMRealBase, osg::ShaderParameterMVec2fBase, osg::ShaderParameterMVec3fBase, osg::ShaderParameterMVec4fBase, osg::ShaderParameterRealBase, osg::ShaderParameterStringBase, osg::ShaderParameterVec2fBase, osg::ShaderParameterVec3fBase, osg::ShaderParameterVec4fBase, osg::SHLChunkBase, osg::SHLParameterChunkBase, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, osg::QTWindowBase, osg::SimpleAttachment< osg::NameAttachmentDesc >, and osg::SimpleAttachment< osg::VoidPAttachmentDesc >.
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result, | |
| const typename ObjectPtrT::StoredObjectType * | prototypeP | |||
| ) | [inline, static, protected, inherited] |
Definition at line 138 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
Referenced by osg::XWindowBase::createEmpty(), osg::WIN32WindowBase::createEmpty(), osg::ViewportBase::createEmpty(), osg::VertexProgramChunkBase::createEmpty(), osg::TwoSidedLightingChunkBase::createEmpty(), osg::TransformChunkBase::createEmpty(), osg::TransformBase::createEmpty(), osg::TileCameraDecoratorBase::createEmpty(), osg::TextureTransformChunkBase::createEmpty(), osg::TextureGrabForegroundBase::createEmpty(), osg::TextureGrabBackgroundBase::createEmpty(), osg::TextureChunkBase::createEmpty(), osg::TextureBackgroundBase::createEmpty(), osg::TexGenChunkBase::createEmpty(), osg::SwitchMaterialBase::createEmpty(), osg::SwitchBase::createEmpty(), osg::SurfaceBase::createEmpty(), osg::StringAttributeMapBase::createEmpty(), osg::StereoBufferViewportBase::createEmpty(), osg::StencilChunkBase::createEmpty(), osg::StateSortingGroupBase::createEmpty(), osg::StateBase::createEmpty(), osg::SpotLightBase::createEmpty(), osg::SortFirstWindowBase::createEmpty(), osg::SolidBackgroundBase::createEmpty(), osg::SlicesBase::createEmpty(), osg::SkyBackgroundBase::createEmpty(), osg::SimpleTexturedMaterialBase::createEmpty(), osg::SimpleStatisticsForegroundBase::createEmpty(), osg::SimpleMaterialBase::createEmpty(), osg::SHLParameterChunkBase::createEmpty(), osg::SHLChunkBase::createEmpty(), osg::ShearedStereoCameraDecoratorBase::createEmpty(), osg::ShaderParameterVec4fBase::createEmpty(), osg::ShaderParameterVec3fBase::createEmpty(), osg::ShaderParameterVec2fBase::createEmpty(), osg::ShaderParameterStringBase::createEmpty(), osg::ShaderParameterRealBase::createEmpty(), osg::ShaderParameterMVec4fBase::createEmpty(), osg::ShaderParameterMVec3fBase::createEmpty(), osg::ShaderParameterMVec2fBase::createEmpty(), osg::ShaderParameterMRealBase::createEmpty(), osg::ShaderParameterMMatrixBase::createEmpty(), osg::ShaderParameterMIntBase::createEmpty(), osg::ShaderParameterMatrixBase::createEmpty(), osg::ShaderParameterIntBase::createEmpty(), osg::ShaderParameterBoolBase::createEmpty(), osg::ScreenGroupBase::createEmpty(), osg::SClipPlaneChunkBase::createEmpty(), osg::ResolutionDisplayFilterBase::createEmpty(), osg::RenderOptionsBase::createEmpty(), osg::RegisterCombinersChunkBase::createEmpty(), osg::QTWindowBase::createEmpty(), osg::ProxyGroupBase::createEmpty(), osg::ProjectionCameraDecoratorBase::createEmpty(), osg::PolygonForegroundBase::createEmpty(), osg::PolygonChunkBase::createEmpty(), osg::PolygonBackgroundBase::createEmpty(), osg::PointLightBase::createEmpty(), osg::PointChunkBase::createEmpty(), osg::PhongMaterialBase::createEmpty(), osg::PerspectiveCameraBase::createEmpty(), osg::PassiveWindowBase::createEmpty(), osg::PassiveViewportBase::createEmpty(), osg::PassiveBackgroundBase::createEmpty(), osg::ParticlesBase::createEmpty(), osg::OrthographicCameraBase::createEmpty(), osg::OffCenterPerspectiveCameraBase::createEmpty(), osg::MultiPassMaterialBase::createEmpty(), osg::MultiDisplayWindowBase::createEmpty(), osg::MatrixCameraDecoratorBase::createEmpty(), osg::MatrixCameraBase::createEmpty(), osg::MaterialPoolBase::createEmpty(), osg::MaterialGroupBase::createEmpty(), osg::MaterialChunkBase::createEmpty(), osg::LogicOpChunkBase::createEmpty(), osg::LineChunkBase::createEmpty(), osg::LightModelChunkBase::createEmpty(), osg::LightEnvBase::createEmpty(), osg::LightChunkBase::createEmpty(), osg::InverseTransformBase::createEmpty(), osg::InlineBase::createEmpty(), osg::ImageForegroundBase::createEmpty(), osg::ImageBase::createEmpty(), osg::ImageBackgroundBase::createEmpty(), osg::GroupBase::createEmpty(), osg::GraphicStatisticsForegroundBase::createEmpty(), osg::GradientBackgroundBase::createEmpty(), osg::GrabForegroundBase::createEmpty(), osg::GLUTWindowBase::createEmpty(), osg::GeometryBase::createEmpty(), osg::FresnelMaterialBase::createEmpty(), osg::FragmentProgramChunkBase::createEmpty(), osg::FileGrabForegroundBase::createEmpty(), osg::FCPtrAttributeMapBase::createEmpty(), osg::FBOViewportBase::createEmpty(), osg::FatBorderChunkBase::createEmpty(), osg::DVRVolumeTextureBase::createEmpty(), osg::DVRVolumeBase::createEmpty(), osg::DVRSimpleShaderBase::createEmpty(), osg::DVRSimpleLUTShaderBase::createEmpty(), osg::DVRMtexLUTShaderBase::createEmpty(), osg::DVRLookupTableBase::createEmpty(), osg::DVRIsoSurfaceBase::createEmpty(), osg::DVRIsoShaderBase::createEmpty(), osg::DVRGeometryBase::createEmpty(), osg::DVRClipObjectsBase::createEmpty(), osg::DVRClipGeometryBase::createEmpty(), osg::DVRAppearanceBase::createEmpty(), osg::DistortionDisplayFilterBase::createEmpty(), osg::DistanceLODBase::createEmpty(), osg::DisplayFilterForegroundBase::createEmpty(), osg::DisplayCalibrationBase::createEmpty(), osg::DirectionalLightBase::createEmpty(), osg::DepthClearBackgroundBase::createEmpty(), osg::DepthChunkBase::createEmpty(), osg::CubeTextureChunkBase::createEmpty(), osg::ComponentTransformBase::createEmpty(), osg::ColorMaskChunkBase::createEmpty(), osg::ColorDisplayFilterBase::createEmpty(), osg::ColorBufferViewportBase::createEmpty(), osg::ClusterWindowBase::createEmpty(), osg::ClipPlaneChunkBase::createEmpty(), osg::ClipPlaneBase::createEmpty(), osg::ChunkMaterialBase::createEmpty(), osg::BlendChunkBase::createEmpty(), osg::BillboardBase::createEmpty(), osg::XWindowBase::shallowCopy(), osg::WIN32WindowBase::shallowCopy(), osg::ViewportBase::shallowCopy(), osg::VertexProgramChunkBase::shallowCopy(), osg::TwoSidedLightingChunkBase::shallowCopy(), osg::TransformChunkBase::shallowCopy(), osg::TransformBase::shallowCopy(), osg::TileCameraDecoratorBase::shallowCopy(), osg::TextureTransformChunkBase::shallowCopy(), osg::TextureGrabForegroundBase::shallowCopy(), osg::TextureGrabBackgroundBase::shallowCopy(), osg::TextureChunkBase::shallowCopy(), osg::TextureBackgroundBase::shallowCopy(), osg::TexGenChunkBase::shallowCopy(), osg::SwitchMaterialBase::shallowCopy(), osg::SwitchBase::shallowCopy(), osg::SurfaceBase::shallowCopy(), osg::StringAttributeMapBase::shallowCopy(), osg::StereoBufferViewportBase::shallowCopy(), osg::StencilChunkBase::shallowCopy(), osg::StateSortingGroupBase::shallowCopy(), osg::StateBase::shallowCopy(), osg::SpotLightBase::shallowCopy(), osg::SortFirstWindowBase::shallowCopy(), osg::SolidBackgroundBase::shallowCopy(), osg::SlicesBase::shallowCopy(), osg::SkyBackgroundBase::shallowCopy(), osg::SimpleTexturedMaterialBase::shallowCopy(), osg::SimpleStatisticsForegroundBase::shallowCopy(), osg::SimpleMaterialBase::shallowCopy(), osg::SHLParameterChunkBase::shallowCopy(), osg::SHLChunkBase::shallowCopy(), osg::ShearedStereoCameraDecoratorBase::shallowCopy(), osg::ShaderParameterVec4fBase::shallowCopy(), osg::ShaderParameterVec3fBase::shallowCopy(), osg::ShaderParameterVec2fBase::shallowCopy(), osg::ShaderParameterStringBase::shallowCopy(), osg::ShaderParameterRealBase::shallowCopy(), osg::ShaderParameterMVec4fBase::shallowCopy(), osg::ShaderParameterMVec3fBase::shallowCopy(), osg::ShaderParameterMVec2fBase::shallowCopy(), osg::ShaderParameterMRealBase::shallowCopy(), osg::ShaderParameterMMatrixBase::shallowCopy(), osg::ShaderParameterMIntBase::shallowCopy(), osg::ShaderParameterMatrixBase::shallowCopy(), osg::ShaderParameterIntBase::shallowCopy(), osg::ShaderParameterBoolBase::shallowCopy(), osg::ScreenGroupBase::shallowCopy(), osg::SClipPlaneChunkBase::shallowCopy(), osg::ResolutionDisplayFilterBase::shallowCopy(), osg::RenderOptionsBase::shallowCopy(), osg::RegisterCombinersChunkBase::shallowCopy(), osg::QTWindowBase::shallowCopy(), osg::ProxyGroupBase::shallowCopy(), osg::ProjectionCameraDecoratorBase::shallowCopy(), osg::PolygonForegroundBase::shallowCopy(), osg::PolygonChunkBase::shallowCopy(), osg::PolygonBackgroundBase::shallowCopy(), osg::PointLightBase::shallowCopy(), osg::PointChunkBase::shallowCopy(), osg::PhongMaterialBase::shallowCopy(), osg::PerspectiveCameraBase::shallowCopy(), osg::PassiveWindowBase::shallowCopy(), osg::PassiveViewportBase::shallowCopy(), osg::PassiveBackgroundBase::shallowCopy(), osg::ParticlesBase::shallowCopy(), osg::OrthographicCameraBase::shallowCopy(), osg::OffCenterPerspectiveCameraBase::shallowCopy(), osg::MultiPassMaterialBase::shallowCopy(), osg::MultiDisplayWindowBase::shallowCopy(), osg::MatrixCameraDecoratorBase::shallowCopy(), osg::MatrixCameraBase::shallowCopy(), osg::MaterialPoolBase::shallowCopy(), osg::MaterialGroupBase::shallowCopy(), osg::MaterialChunkBase::shallowCopy(), osg::LogicOpChunkBase::shallowCopy(), osg::LineChunkBase::shallowCopy(), osg::LightModelChunkBase::shallowCopy(), osg::LightEnvBase::shallowCopy(), osg::LightChunkBase::shallowCopy(), osg::InverseTransformBase::shallowCopy(), osg::InlineBase::shallowCopy(), osg::ImageForegroundBase::shallowCopy(), osg::ImageBase::shallowCopy(), osg::ImageBackgroundBase::shallowCopy(), osg::GroupBase::shallowCopy(), osg::GraphicStatisticsForegroundBase::shallowCopy(), osg::GradientBackgroundBase::shallowCopy(), osg::GrabForegroundBase::shallowCopy(), osg::GLUTWindowBase::shallowCopy(), osg::GeometryBase::shallowCopy(), osg::FresnelMaterialBase::shallowCopy(), osg::FragmentProgramChunkBase::shallowCopy(), osg::FileGrabForegroundBase::shallowCopy(), osg::FCPtrAttributeMapBase::shallowCopy(), osg::FBOViewportBase::shallowCopy(), osg::FatBorderChunkBase::shallowCopy(), osg::DVRVolumeTextureBase::shallowCopy(), osg::DVRVolumeBase::shallowCopy(), osg::DVRSimpleShaderBase::shallowCopy(), osg::DVRSimpleLUTShaderBase::shallowCopy(), osg::DVRMtexLUTShaderBase::shallowCopy(), osg::DVRLookupTableBase::shallowCopy(), osg::DVRIsoSurfaceBase::shallowCopy(), osg::DVRIsoShaderBase::shallowCopy(), osg::DVRGeometryBase::shallowCopy(), osg::DVRClipObjectsBase::shallowCopy(), osg::DVRClipGeometryBase::shallowCopy(), osg::DVRAppearanceBase::shallowCopy(), osg::DistortionDisplayFilterBase::shallowCopy(), osg::DistanceLODBase::shallowCopy(), osg::DisplayFilterForegroundBase::shallowCopy(), osg::DisplayCalibrationBase::shallowCopy(), osg::DirectionalLightBase::shallowCopy(), osg::DepthClearBackgroundBase::shallowCopy(), osg::DepthChunkBase::shallowCopy(), osg::CubeTextureChunkBase::shallowCopy(), osg::ComponentTransformBase::shallowCopy(), osg::ColorMaskChunkBase::shallowCopy(), osg::ColorDisplayFilterBase::shallowCopy(), osg::ColorBufferViewportBase::shallowCopy(), osg::ClusterWindowBase::shallowCopy(), osg::ClipPlaneChunkBase::shallowCopy(), osg::ClipPlaneBase::shallowCopy(), osg::ChunkMaterialBase::shallowCopy(), osg::BlendChunkBase::shallowCopy(), and osg::BillboardBase::shallowCopy().
00141 { 00142 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00143 00144 UInt8 *pTmp; 00145 00146 result._containerSize = sizeof(ObjectType); 00147 00148 pTmp = 00149 static_cast<UInt8 *>(operator new( 00150 sizeof(Int32) + // ReferenceCount 00151 sizeof(UInt32) + // ContainerId 00152 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00153 00154 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00155 00156 pTmp += sizeof(Int32); 00157 00158 result._storeP = (pTmp + sizeof(UInt32)); 00159 00160 #ifdef OSG_DEBUG_FCPTR 00161 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00162 #endif 00163 00164 *(reinterpret_cast<UInt32 *>(pTmp)) = 00165 FieldContainerFactory::the()->registerFieldContainer(result); 00166 00167 Thread::getCurrentChangeList()->addCreated( 00168 *(reinterpret_cast<UInt32 *>(pTmp))); 00169 00170 pTmp += sizeof(UInt32); 00171 00172 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00173 00174 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00175 { 00176 pTmp = 00177 reinterpret_cast<UInt8 *>(new (pTmp) ObjectType(*prototypeP)); 00178 00179 pTmp += sizeof(ObjectType); 00180 } 00181 00182 result->onCreate(prototypeP); 00183 00184 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00185 { 00186 aObject[i].onCreateAspect(aObject, prototypeP); 00187 } 00188 00189 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00190 00191 fprintf(stderr, "GV_MEM_FC_DBG : (%u) cc (%p|%u)\n", 00192 Thread::getAspect(), 00193 result._storeP, 00194 // ObjectType::getClassType().getCName(), 00195 ObjectType::getClassType().getId()); 00196 #endif 00197 00198 #ifdef OSG_DEBUG_TYPED_FCPTR 00199 result.updateTypedStore(); 00200 #endif 00201 }
| void osg::FieldContainer::newPtr | ( | ObjectPtrT & | result | ) | [inline, static, protected, inherited] |
Definition at line 204 of file OSGFieldContainerImpl.inl.
References osg::ChangeList::addCreated(), osg::PThreadBase::getAspect(), osg::PThreadBase::getCurrentChangeList(), osg::ThreadManager::getNumAspects(), osg::FieldContainerFactory::registerFieldContainer(), and osg::FieldContainerFactory::the().
00205 { 00206 typedef typename ObjectPtrT::StoredObjectType ObjectType; 00207 00208 UInt8 *pTmp; 00209 00210 result._containerSize = sizeof(ObjectType); 00211 00212 pTmp = 00213 static_cast<UInt8 *>(operator new( 00214 sizeof(Int32) + // ReferenceCount 00215 sizeof(UInt32) + // ContainerId 00216 sizeof(ObjectType) * ThreadManager::getNumAspects())); 00217 00218 *(reinterpret_cast<Int32 *>(pTmp)) = 0; 00219 00220 pTmp += sizeof(Int32); 00221 00222 result._storeP = (pTmp + sizeof(UInt32)); 00223 00224 #ifdef OSG_DEBUG_FCPTR 00225 result._typedStoreP = reinterpret_cast<FieldContainer *>(result._storeP); 00226 #endif 00227 00228 *(reinterpret_cast<UInt32 *>(pTmp)) = 00229 FieldContainerFactory::the()->registerFieldContainer(result); 00230 00231 Thread::getCurrentChangeList()->addCreated( 00232 *(reinterpret_cast<UInt32 *>(pTmp))); 00233 00234 pTmp += sizeof(UInt32); 00235 00236 ObjectType *aObject = reinterpret_cast<ObjectType *>(pTmp); 00237 00238 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00239 { 00240 pTmp = reinterpret_cast<UInt8 *>(new (pTmp) ObjectType()); 00241 00242 pTmp += sizeof(ObjectType); 00243 } 00244 00245 result->onCreate(); 00246 00247 for(UInt32 i = 0; i < ThreadManager::getNumAspects(); i++) 00248 { 00249 aObject[i].onCreateAspect(aObject); 00250 } 00251 00252 #if defined(OSG_GV_BETA) && defined(OSG_DBG_MEM) 00253 fprintf(stderr, "GV_MEM_FC_DBG : (%u) c (%p|%u)\n", 00254 Thread::getAspect(), 00255 result._storeP, 00256 // ObjectType::getClassType().getCName(), 00257 ObjectType::getClassType().getId()); 00258 #endif 00259 00260 #ifdef OSG_DEBUG_TYPED_FCPTR 00261 result.updateTypedStore(); 00262 #endif 00263 }
| void osg::FieldContainer::beginEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
| void osg::FieldContainer::endEditX | ( | const BitVector & | whichField, | |
| FieldTypeT & | field | |||
| ) | [inline, protected, inherited] |
Definition at line 291 of file OSGFieldContainerImpl.inl.
References osg::endEditCP().
00292 { 00293 FieldContainerPtr tmpPtr(this); 00294 endEditCP(tmpPtr, whichField); 00295 }
| void osg::FieldContainer::onCreate | ( | const FieldContainer * | source = NULL |
) | [inline, protected, inherited] |
Definition at line 318 of file OSGFieldContainerImpl.inl.
Referenced by osg::ShaderParameterChunk::onCreate().
| void osg::FieldContainer::onCreateAspect | ( | const FieldContainer * | aspect0, | |
| const FieldContainer * | source = NULL | |||
| ) | [inline, protected, inherited] |
friend class GLObject [friend] |
Definition at line 294 of file OSGWindow.h.
friend class FieldContainer [friend] |
Reimplemented from osg::WindowBase.
Reimplemented in osg::ClusterWindow, osg::ClusterWindowBase, osg::MultiDisplayWindow, osg::MultiDisplayWindowBase, osg::SortFirstWindow, osg::SortFirstWindowBase, osg::PassiveWindow, osg::PassiveWindowBase, osg::XWindow, osg::XWindowBase, osg::WIN32WindowBase, osg::GLUTWindowBase, osg::QTWindow, and osg::QTWindowBase.
Definition at line 340 of file OSGWindow.h.
friend class WindowBase [friend] |
Definition at line 341 of file OSGWindow.h.
const Real32 osg::Window::unknownConstant = -1e100 [static] |
Definition at line 94 of file OSGWindow.h.
Referenced by osg::TextureTransformChunk::activate(), osg::TextureChunk::activate(), osg::TexGenChunk::activate(), osg::CubeTextureChunk::activate(), osg::TextureTransformChunk::changeFrom(), osg::TextureChunk::changeFrom(), osg::TexGenChunk::changeFrom(), osg::CubeTextureChunk::changeFrom(), osg::TextureTransformChunk::deactivate(), osg::TextureChunk::deactivate(), osg::TexGenChunk::deactivate(), osg::CubeTextureChunk::deactivate(), and frameInit().
std::vector< WindowPtr > osg::Window::_allWindows [static, private] |
The global window list, needed by Window::refreshGLObject. All Windows are added here at creation time and removed at deletion.
Definition at line 343 of file OSGWindow.h.
Referenced by onCreate(), and onDestroy().
UInt32 osg::Window::_currentWindowId = 0 [static, private] |
Lock * osg::Window::_GLObjectLock [static, private] |
The lock used to mutex access of the GLObjects' reference count. One should be enough for all of them, as they are pretty rarely changed, only when they are used for the first time.
Definition at line 361 of file OSGWindow.h.
Referenced by osg::Window::GLObject::decRefCounter(), and osg::Window::GLObject::incRefCounter().
Lock * osg::Window::_staticWindowLock [static, private] |
The lock used to mutex access of the Window's static elements to manage OpenGL extensions/functions/constants/objects.
Definition at line 362 of file OSGWindow.h.
Referenced by staticAcquire(), and staticRelease().
std::vector< osg::Window::GLObject * > osg::Window::_glObjects [static, private] |
Global list of all GL Objects used in the system. See OpenGL Objects & Extension Handling for a description.
Definition at line 363 of file OSGWindow.h.
Referenced by frameExit(), getGLObjectsSize(), onDestroy(), operator=(), setGLObjectId(), and Window().
const Char8 * osg::Window::_glLibraryName = NULL [static, private] |
The objects currently being destroyed.
Definition at line 364 of file OSGWindow.h.
Referenced by getFunctionByName(), and setGLLibraryName().
std::vector< std::string > osg::Window::_registeredExtensions [static, private] |
Definition at line 366 of file OSGWindow.h.
Referenced by frameInit(), getExtensionId(), getFunctionByName(), and getRegisteredExtensions().
std::vector< std::string > osg::Window::_ignoredExtensions [static, private] |
std::vector< bool > osg::Window::_commonExtensions [static, private] |
std::vector< std::string > osg::Window::_registeredFunctions [static, private] |
Definition at line 369 of file OSGWindow.h.
Referenced by frameInit(), getFunction(), and getRegisteredFunctions().
std::vector< Int32 > osg::Window::_registeredFunctionExts [static, private] |
std::vector< UInt32 > osg::Window::_registeredFunctionVersions [static, private] |
std::vector< GLenum > osg::Window::_registeredConstants [static, private] |
std::list<DestroyEntry > osg::Window::_glObjectDestroyList [private] |
std::vector<UInt32 > osg::Window::_lastValidate [private] |
Definition at line 384 of file OSGWindow.h.
std::vector<UInt32 > osg::Window::_ids [private] |
UInt32 osg::Window::_glVersion [private] |
std::vector<std::string> osg::Window::_extensions [private] |
Definition at line 388 of file OSGWindow.h.
Referenced by dumpExtensions(), frameInit(), and getExtensions().
std::vector<bool > osg::Window::_availExtensions [private] |
Definition at line 389 of file OSGWindow.h.
Referenced by frameInit(), getFunctionByName(), and hasExtension().
std::vector<void *> osg::Window::_extFunctions [private] |
Definition at line 390 of file OSGWindow.h.
Referenced by frameInit(), getFunction(), and getFunctionNoCheck().
ConstHash osg::Window::_availConstants [private] |
UInt32 osg::Window::_numAvailConstants [private] |
UInt32 osg::Window::_windowId [private] |
const osg::BitVector WindowBase::WidthFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::WidthFieldId)
Definition at line 110 of file OSGWindowBase.h.
Referenced by osg::SortFirstWindow::clientPreSync(), osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), and resize().
const osg::BitVector WindowBase::HeightFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::HeightFieldId)
Definition at line 111 of file OSGWindowBase.h.
Referenced by osg::SortFirstWindow::clientPreSync(), osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), and resize().
const osg::BitVector WindowBase::PortFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::PortFieldId)
Definition at line 112 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), and osg::WindowBase::getBinSize().
const osg::BitVector WindowBase::ResizePendingFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::ResizePendingFieldId)
Definition at line 113 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), resize(), and resizeGL().
const osg::BitVector WindowBase::GlObjectEventCounterFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::GlObjectEventCounterFieldId)
Definition at line 114 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), and osg::RemoteAspect::RemoteAspect().
const osg::BitVector WindowBase::GlObjectLastRefreshFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::GlObjectLastRefreshFieldId)
Definition at line 115 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), and osg::RemoteAspect::RemoteAspect().
const osg::BitVector WindowBase::GlObjectLastReinitializeFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << WindowBase::GlObjectLastReinitializeFieldId)
Definition at line 116 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), and osg::RemoteAspect::RemoteAspect().
const osg::BitVector WindowBase::MTInfluenceMask [static, inherited] |
Initial value:
(Inherited::MTInfluenceMask) |
(static_cast<BitVector>(0x0) << Inherited::NextFieldId)
Reimplemented from osg::FieldContainer.
Reimplemented in osg::ClusterWindowBase, osg::MultiDisplayWindowBase, osg::SortFirstWindowBase, osg::PassiveWindowBase, osg::XWindowBase, osg::WIN32WindowBase, and osg::GLUTWindowBase.
Definition at line 119 of file OSGWindowBase.h.
UInt16 WindowBase::_sfWidth [protected, inherited] |
Definition at line 192 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getSFWidth(), osg::WindowBase::getWidth(), and osg::WindowBase::setWidth().
UInt16 WindowBase::_sfHeight [protected, inherited] |
Definition at line 193 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getHeight(), osg::WindowBase::getSFHeight(), and osg::WindowBase::setHeight().
ViewportPtr WindowBase::_mfPort [protected, inherited] |
Definition at line 194 of file OSGWindowBase.h.
Referenced by addPort(), clearPorts(), osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), drawAllViewports(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getMFPort(), osg::WindowBase::getPort(), insertPort(), operator=(), renderAllViewports(), replacePort(), replacePortBy(), and subPort().
bool WindowBase::_sfResizePending [protected, inherited] |
Definition at line 195 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getResizePending(), osg::WindowBase::getSFResizePending(), isResizePending(), and osg::WindowBase::setResizePending().
UInt32 WindowBase::_sfGlObjectEventCounter [protected, inherited] |
Counter for GL object events. Needed for multi-aspect updates. Is used in glObjectLastRefresh and glObjectLastReinitialize.
Definition at line 196 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getGlObjectEventCounter(), osg::WindowBase::getSFGlObjectEventCounter(), and osg::WindowBase::setGlObjectEventCounter().
UInt32 WindowBase::_mfGlObjectLastRefresh [protected, inherited] |
indicates the last refresh for the GL object
Definition at line 197 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getGlObjectLastRefresh(), and osg::WindowBase::getMFGlObjectLastRefresh().
UInt32 WindowBase::_mfGlObjectLastReinitialize [protected, inherited] |
indicates the last reinit for the GL object
Definition at line 198 of file OSGWindowBase.h.
Referenced by osg::WindowBase::copyFromBin(), osg::WindowBase::copyToBin(), osg::WindowBase::executeSyncImpl(), osg::WindowBase::getBinSize(), osg::WindowBase::getGlObjectLastReinitialize(), and osg::WindowBase::getMFGlObjectLastReinitialize().
const BitVector AttachmentContainer::AttachmentsFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One <<
AttachmentContainer::AttachmentsFieldId)
Definition at line 84 of file OSGAttachmentContainerImpl.h.
Referenced by osg::VRMLFile::beginNode(), osg::AttachmentContainer::changed(), osg::AttachmentContainer::copyFromBin(), osg::AttachmentContainer::copyToBin(), osg::deepCloneAttachments(), osg::AttachmentContainer::executeSyncImpl(), osg::fcptrAttributeMap(), osg::AttachmentContainer::getBinSize(), and osg::stringAttributeMap().
SFAttachmentMap osg::AttachmentContainer::_attachmentMap [protected, inherited] |
Definition at line 161 of file OSGAttachmentContainerImpl.h.
Referenced by osg::AttachmentContainer::AttachmentContainer(), osg::AttachmentContainer::changed(), osg::AttachmentContainer::copyFromBin(), osg::AttachmentContainer::copyToBin(), osg::NodeCore::dump(), osg::Node::dump(), osg::Geometry::dump(), osg::AttachmentContainer::dump(), osg::AttachmentContainer::executeSyncImpl(), osg::AttachmentContainer::findAttachment(), osg::AttachmentContainer::getBinSize(), osg::AttachmentContainer::getSFAttachments(), osg::Node::onCreate(), osg::AttachmentContainer::subAttachment(), and osg::AttachmentContainer::~AttachmentContainer().
const BitVector osg::FieldContainer::NextFieldMask [static, inherited] |
Initial value:
(TypeTraits<BitVector>::One << NextFieldId)
Definition at line 75 of file OSGFieldContainerImpl.h.
const bool osg::FieldContainer::isNodeCore = false [static, inherited] |
UInt32 osg::FieldContainer::_shares [protected, inherited] |
Definition at line 199 of file OSGFieldContainerImpl.h.
1.5.5