Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::PassiveWindow Class Reference

Passive Window class. See Passive Window for a description. More...

#include <OSGPassiveWindow.h>

Inheritance diagram for osg::PassiveWindow:

osg::PassiveWindowBase osg::Window osg::WindowBase osg::AttachmentContainer osg::FieldContainer List of all members.

Extension handling

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 Vec2fgetConstantValuev (GLenum val)
const std::vector< std::string > & getRegisteredFunctions (void)
const std::vector< std::string > & getExtensions (void)
const std::vector< std::string > & getIgnoredExtensions (void)
*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)

GL object handling

*void validateGLObject (UInt32 id)
void validateAllGLObjects (void)
GLObjectStatusE getGLObjectStatus (UInt32 id)
void setGLObjectId (UInt32 id, UInt32 id2)
UInt32 getGLObjectId (UInt32 id)
static void refreshGLObject (UInt32 id)
static void reinitializeGLObject (UInt32 id)
static void destroyGLObject (UInt32 id, UInt32 num=1)
static void unpackIdStatus (UInt32 idstatus, UInt32 &id, GLObjectStatusE &status)

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

typedef PassiveWindowPtr Ptr
typedef ArgsCollector< UInt32GLObjectFunctorArgs
typedef TypedVoidFunctor2Base<
PtrCallArg< Window >, GLObjectFunctorArgs
GLObjectFunctor
typedef void(* GLExtensionFunction )(void)
enum  GLObjectStatusE {
  notused = 1, initialize, reinitialize, initialized,
  needrefresh, destroy, finaldestroy
}
enum  { invalidExtensionID = 0x7fffffff, invalidFunctionID = 0x7fffffff }
enum  { statusShift = 3, statusMask = 7 }

Public Member Functions

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)
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 draw (DrawAction *action=NULL)
virtual void drawAllViewports (DrawAction *action=NULL)
Field Get
*SFUInt16getSFWidth (void)
 Get the Window::_sfWidth field.
SFUInt16getSFHeight (void)
 Get the Window::_sfHeight field.
MFViewportPtrgetMFPort (void)
 Get the Window::_mfPort field.
SFBoolgetSFResizePending (void)
 Get the Window::_sfResizePending field.
UInt16getWidth (void)
 Get the value of the Window::_sfWidth field.
const UInt16getWidth (void) const
 Get the value of the Window::_sfWidth field.
UInt16getHeight (void)
 Get the value of the Window::_sfHeight field.
const UInt16getHeight (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.
ViewportPtrgetPort (const UInt32 index)
 Get the value of the index element the Window::_mfPort field.
MFViewportPtrgetPort (void)
 Get the Window::_mfPort field.
const MFViewportPtrgetPort (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.
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Redefined
*virtual void init (void)
virtual void activate (void)
virtual void deactivate (void)
virtual void swap (void)
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Binary Access
*virtual UInt32 getBinSize (const BitVector &whichField)
virtual void copyToBin (BinaryDataHandler &pMem, const BitVector &whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField)
Copy
*virtual FieldContainerPtr shallowCopy (void) const
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)
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)
Field Get
*SFUInt16getSFWidth (void)
 Get the Window::_sfWidth field.
SFUInt16getSFHeight (void)
 Get the Window::_sfHeight field.
MFViewportPtrgetMFPort (void)
 Get the Window::_mfPort field.
SFBoolgetSFResizePending (void)
 Get the Window::_sfResizePending field.
UInt16getWidth (void)
 Get the value of the Window::_sfWidth field.
const UInt16getWidth (void) const
 Get the value of the Window::_sfWidth field.
UInt16getHeight (void)
 Get the value of the Window::_sfHeight field.
const UInt16getHeight (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.
ViewportPtrgetPort (const UInt32 index)
 Get the value of the index element the Window::_mfPort field.
MFViewportPtrgetPort (void)
 Get the Window::_mfPort field.
const MFViewportPtrgetPort (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.

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)
static void registerConstant (GLenum val)
GL object registration
*static UInt32 registerGLObject (GLObjectFunctor functor, UInt32 num=1)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static PassiveWindowPtr create (void)
 create a new instance of the class
static PassiveWindowPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
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)
static void registerConstant (GLenum val)
GL object registration
*static UInt32 registerGLObject (GLObjectFunctor functor, UInt32 num=1)

Static Public Attributes

static const osg::BitVector MTInfluenceMask
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 BitVector AttachmentsFieldMask
static const BitVector NextFieldMask

Protected Member Functions

Sync
*void executeSyncImpl (WindowBase *pOther, const BitVector &whichField)
GL setup handling
*virtual void setupGL (void)
Field Get
*SFUInt32getSFGlObjectEventCounter (void)
 Get the Window::_sfGlObjectEventCounter field.
MFUInt32getMFGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
MFUInt32getMFGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
UInt32getGlObjectEventCounter (void)
 Get the value of the Window::_sfGlObjectEventCounter field.
const UInt32getGlObjectEventCounter (void) const
 Get the value of the Window::_sfGlObjectEventCounter field.
UInt32getGlObjectLastRefresh (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastRefresh field.
MFUInt32getGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
const MFUInt32getGlObjectLastRefresh (void) const
 Get the Window::_mfGlObjectLastRefresh field.
UInt32getGlObjectLastReinitialize (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastReinitialize field.
MFUInt32getGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
const MFUInt32getGlObjectLastReinitialize (void) const
 Get the Window::_mfGlObjectLastReinitialize field.
Field Set
*void setGlObjectEventCounter (const UInt32 &value)
 Set the value of the Window::_sfGlObjectEventCounter field.
Constructors
PassiveWindow (void)
 PassiveWindow (const PassiveWindow &source)
Destructors
*virtual ~PassiveWindow (void)
Sync
*void executeSyncImpl (PassiveWindowBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Sync
*void executeSyncImpl (WindowBase *pOther, const BitVector &whichField)
GL setup handling
*virtual void setupGL (void)
Field Get
*SFUInt32getSFGlObjectEventCounter (void)
 Get the Window::_sfGlObjectEventCounter field.
MFUInt32getMFGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
MFUInt32getMFGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
UInt32getGlObjectEventCounter (void)
 Get the value of the Window::_sfGlObjectEventCounter field.
const UInt32getGlObjectEventCounter (void) const
 Get the value of the Window::_sfGlObjectEventCounter field.
UInt32getGlObjectLastRefresh (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastRefresh field.
MFUInt32getGlObjectLastRefresh (void)
 Get the Window::_mfGlObjectLastRefresh field.
const MFUInt32getGlObjectLastRefresh (void) const
 Get the Window::_mfGlObjectLastRefresh field.
UInt32getGlObjectLastReinitialize (UInt32 index)
 Get the value of the index element the Window::_mfGlObjectLastReinitialize field.
MFUInt32getGlObjectLastReinitialize (void)
 Get the Window::_mfGlObjectLastReinitialize field.
const MFUInt32getGlObjectLastReinitialize (void) const
 Get the Window::_mfGlObjectLastReinitialize field.
Field Set
*void setGlObjectEventCounter (const UInt32 &value)
 Set the value of the Window::_sfGlObjectEventCounter field.

Protected Attributes

Map for GL cvonstant handling
*typedef std::map< GLenum,
Vec2f
ConstHash
Fields
*SFUInt16 _sfWidth
SFUInt16 _sfHeight
MFViewportPtr _mfPort
SFBool _sfResizePending
SFUInt32 _sfGlObjectEventCounter
MFUInt32 _mfGlObjectLastRefresh
MFUInt32 _mfGlObjectLastReinitialize
Map for GL cvonstant handling
*typedef std::map< GLenum,
Vec2f
ConstHash
Fields
*SFUInt16 _sfWidth
SFUInt16 _sfHeight
MFViewportPtr _mfPort
SFBool _sfResizePending
SFUInt32 _sfGlObjectEventCounter
MFUInt32 _mfGlObjectLastRefresh
MFUInt32 _mfGlObjectLastReinitialize

Private Types

typedef PassiveWindowBase Inherited

Private Member Functions

void operator= (const PassiveWindow &source)

Static Private Member Functions

static void initMethod (void)

Friends

class FieldContainer
class PassiveWindowBase
GL object handling helper class
class GLObject
GL object handling helper class
class GLObject

Detailed Description

A PassiveWindow is a Window class for integration into other OpenGL programs. See Passive Window for a description.

Definition at line 55 of file OSGPassiveWindow.h.


Member Typedef Documentation

typedef PassiveWindowBase osg::PassiveWindow::Inherited [private]
 

Reimplemented from osg::PassiveWindowBase.

Definition at line 59 of file OSGPassiveWindow.h.

typedef PassiveWindowPtr osg::PassiveWindowBase::Ptr [inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 89 of file OSGPassiveWindowBase.h.

typedef ArgsCollector<UInt32> osg::Window::GLObjectFunctorArgs [inherited]
 

Definition at line 96 of file OSGWindow.h.

typedef TypedVoidFunctor2Base<PtrCallArg<Window> , GLObjectFunctorArgs> osg::Window::GLObjectFunctor [inherited]
 

Definition at line 99 of file OSGWindow.h.

typedef void(* osg::Window::GLExtensionFunction)(void) [inherited]
 

Definition at line 101 of file OSGWindow.h.


Member Enumeration Documentation

enum osg::Window::GLObjectStatusE [inherited]
 

Enumeration values for the status of the GL objects. This is primarily used to signal the object's callback functions what to do. See OpenGL Objects & Extension Handling for a description.

Enumerator:
notused  Object is not used at all right now.
initialize  The object is being initialized for the first time.
reinitialize  The object is being re-initialized, i.e. it has changed significantly.
initialized  The object is initialized and valid.
needrefresh  The object is initialized but needs a refresh.
destroy  The object is to be destroyed, i.e. removed from the current OpenGL context.
finaldestroy  The object has been removed from all OpenGL contexts and used ressources but be freed now.

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 [inherited]
 

Enumerator:
invalidExtensionID 
invalidFunctionID 

Reimplemented from osg::WindowBase.

Definition at line 89 of file OSGWindow.h.

00089 { invalidExtensionID = 0x7fffffff, invalidFunctionID = 0x7fffffff };

anonymous enum [inherited]
 

Enumerator:
statusShift  Shift value to transform object id and status into asingle int.
statusMask  Mask value to transform object id and status into asingle int.

Definition at line 92 of file OSGWindow.h.

00092 { statusShift = 3, statusMask = 7 }; 


Constructor & Destructor Documentation

PassiveWindow::PassiveWindow void   )  [protected]
 

Definition at line 66 of file OSGPassiveWindow.cpp.

00066                                  :
00067     Inherited()
00068 {
00069 }

PassiveWindow::PassiveWindow const PassiveWindow source  )  [protected]
 

Definition at line 71 of file OSGPassiveWindow.cpp.

00071                                                         :
00072     Inherited(source)
00073 {
00074 }

PassiveWindow::~PassiveWindow void   )  [protected, virtual]
 

Definition at line 76 of file OSGPassiveWindow.cpp.

00077 {
00078 }


Member Function Documentation

void PassiveWindow::changed BitVector  whichField,
UInt32  origin
[virtual]
 

react to field changes

Reimplemented from osg::Window.

Definition at line 86 of file OSGPassiveWindow.cpp.

References osg::Window::changed().

00087 {
00088     Inherited::changed(whichField, origin);
00089 }

void PassiveWindow::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual]
 

output the instance for debug purposes

Reimplemented from osg::Window.

Definition at line 91 of file OSGPassiveWindow.cpp.

References SLOG.

00093 {
00094     SLOG << "Dump PassiveWindow NI" << std::endl;
00095 }

void PassiveWindow::init void   )  [virtual]
 

Just call the standard OpenGL setup.

Implements osg::Window.

Definition at line 99 of file OSGPassiveWindow.cpp.

References osg::Window::setupGL().

00100 {
00101     setupGL();
00102 }

void PassiveWindow::activate void   )  [virtual]
 

Just call the standard OpenGL setup.

Implements osg::Window.

Definition at line 106 of file OSGPassiveWindow.cpp.

00107 {
00108 }

virtual void osg::PassiveWindow::deactivate void   )  [inline, virtual]
 

Just call the standard OpenGL setup.

Implements osg::Window.

Definition at line 88 of file OSGPassiveWindow.h.

00088 {}

void PassiveWindow::swap void   )  [virtual]
 

Just call the standard OpenGL setup.

Implements osg::Window.

Definition at line 112 of file OSGPassiveWindow.cpp.

00113 {
00114 }

void PassiveWindow::initMethod void   )  [static, private]
 

initialize the static features of the class, e.g. action callbacks

Reimplemented from osg::Window.

Definition at line 82 of file OSGPassiveWindow.cpp.

00083 {
00084 }

void osg::PassiveWindow::operator= const PassiveWindow source  )  [private]
 

osg::FieldContainerType & osg::PassiveWindowBase::getClassType void   )  [inline, static, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 58 of file OSGPassiveWindowBase.inl.

References osg::PassiveWindowBase::_type.

Referenced by osg::PassiveWindowBase::create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::PassiveWindowBase::getClassTypeId void   )  [inline, static, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 65 of file OSGPassiveWindowBase.inl.

References osg::PassiveWindowBase::_type, and osg::TypeBase::getId().

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & PassiveWindowBase::getType void   )  [virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 86 of file OSGPassiveWindowBase.cpp.

References osg::PassiveWindowBase::_type.

00087 {
00088     return _type; 
00089 } 

const FieldContainerType & PassiveWindowBase::getType void   )  const [virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 91 of file OSGPassiveWindowBase.cpp.

References osg::PassiveWindowBase::_type.

00092 {
00093     return _type;
00094 } 

UInt32 PassiveWindowBase::getContainerSize void   )  const [virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 106 of file OSGPassiveWindowBase.cpp.

00107 { 
00108     return sizeof(PassiveWindow); 
00109 }

UInt32 PassiveWindowBase::getBinSize const BitVector whichField  )  [virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 166 of file OSGPassiveWindowBase.cpp.

References osg::WindowBase::getBinSize().

00167 {
00168     UInt32 returnValue = Inherited::getBinSize(whichField);
00169 
00170 
00171     return returnValue;
00172 }

void PassiveWindowBase::copyToBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 174 of file OSGPassiveWindowBase.cpp.

References osg::WindowBase::copyToBin().

00176 {
00177     Inherited::copyToBin(pMem, whichField);
00178 
00179 
00180 }

void PassiveWindowBase::copyFromBin BinaryDataHandler pMem,
const BitVector whichField
[virtual, inherited]
 

Reimplemented from osg::WindowBase.

Definition at line 182 of file OSGPassiveWindowBase.cpp.

References osg::WindowBase::copyFromBin().

00184 {
00185     Inherited::copyFromBin(pMem, whichField);
00186 
00187 
00188 }

PassiveWindowPtr osg::PassiveWindowBase::create void   )  [inline, static, inherited]
 

Definition at line 72 of file OSGPassiveWindowBase.inl.

References osg::AttachmentContainerPtr::dcast(), osg::PassiveWindowBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::PassiveWindowBase::shallowCopy().

00073 {
00074     PassiveWindowPtr fc; 
00075 
00076     if(getClassType().getPrototype() != OSG::NullFC) 
00077     {
00078         fc = PassiveWindowPtr::dcast(
00079             getClassType().getPrototype()-> shallowCopy()); 
00080     }
00081     
00082     return fc; 
00083 }

PassiveWindowPtr osg::PassiveWindowBase::createEmpty void   )  [inline, static, inherited]
 

Definition at line 87 of file OSGPassiveWindowBase.inl.

References osg::FieldContainer::newPtr().

00088 { 
00089     PassiveWindowPtr returnValue; 
00090     
00091