ParCompMark::GLXGLContext Class Reference

#include <PCMGLXGLContext.h>

Collaboration diagram for ParCompMark::GLXGLContext:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class that encapsulates a GLX context.

Original source can be found in Ogre3D sources (http://ogre3d.org).

Definition at line 60 of file PCMGLXGLContext.h.


Public Types

typedef Pointer< GLXGLContext,
Mutex
Pointer
 Type for pointer on this class.

Public Member Functions

Constructors & destructor
 GLXGLContext (XDisplay::Pointer &display, GLXRenderWindow *glxWindow,::XVisualInfo *visualInfo)
 Create GLX context.
virtual ~GLXGLContext ()
 The destructor.
Getters & setters
const bool & getInitialized () const
 Getter of mInitialized.
const XDisplay::PointergetDisplay () const
 Getter of mDisplay.
GLXRenderWindowgetGLXWindow () const
 Getter of mGLXWindow.
::XVisualInfo * getVisualInfo () const
 Getter of mVisualInfo.
const ::GLXContext & getGLXContext () const
 Getter of mGLXContext.
const bool & getTainted () const
 Getter of mTainted.
void setTainted (const bool &tainted)
 Setter of mTainted.
Methods
virtual void initialize ()
 Initialize the GL context.
virtual void finalize ()
 Finalize the GL context.
virtual void setCurrent ()
 Enable the context.
virtual void releaseCurrent ()
 Release the current context without assigning a new one.

Protected Attributes

Variables
bool mInitialized
 The context is initialized.
XDisplay::Pointer mDisplay
 Corresponding X Display.
GLXRenderWindowmGLXWindow
 Corresponding GLX rendering window.
::XVisualInfo * mVisualInfo
 Visual info for the context.
::GLXContext mGLXContext
 Wrapped GLX context.
bool mTainted
 The GLXContext attribute is maintaned by another code (In our case the PC library).

Member Typedef Documentation

Type for pointer on this class.

Definition at line 78 of file PCMGLXGLContext.h.


Constructor & Destructor Documentation

ParCompMark::GLXGLContext::GLXGLContext ( XDisplay::Pointer display,
GLXRenderWindow glxWindow,
::XVisualInfo *  visualInfo 
)

Create GLX context.

Parameters:
[out] display X display
[in] glxWindow Corresponding GLX rendering window.
[in] visualInfo Visualinfo for context creation

Definition at line 42 of file PCMGLXGLContext.cpp.

References Assert, ParCompMark::GLXRenderWindow::getCaption(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::Pointer< T, Lock >::isNotNull(), mGLXContext, mGLXWindow, mInitialized, mTainted, mVisualInfo, and ParCompMark::Logger::NOTICE.

Here is the call graph for this function:

ParCompMark::GLXGLContext::~GLXGLContext (  )  [virtual]

The destructor.

This class has virtual destructor.

Definition at line 73 of file PCMGLXGLContext.cpp.

References Assert, finalize(), ParCompMark::GLXRenderWindow::getCaption(), ParCompMark::Singleton< T >::getInstance(), mGLXWindow, mInitialized, mVisualInfo, and ParCompMark::Logger::NOTICE.

Here is the call graph for this function:


Member Function Documentation

void ParCompMark::GLXGLContext::finalize (  )  [virtual]

const XDisplay::Pointer & ParCompMark::GLXGLContext::getDisplay (  )  const [inline]

Getter of mDisplay.

Returns value of mDisplay.

Returns:
The value of mDisplay

Definition at line 292 of file PCMGLXGLContext.h.

const ::GLXContext & ParCompMark::GLXGLContext::getGLXContext (  )  const [inline]

Getter of mGLXContext.

Returns value of mGLXContext.

Returns:
The value of mGLXContext

Definition at line 313 of file PCMGLXGLContext.h.

GLXRenderWindow * ParCompMark::GLXGLContext::getGLXWindow (  )  const [inline]

Getter of mGLXWindow.

Returns value of mGLXWindow.

Returns:
The value of mGLXWindow

Definition at line 299 of file PCMGLXGLContext.h.

const bool & ParCompMark::GLXGLContext::getInitialized (  )  const [inline]

Getter of mInitialized.

Returns value of mInitialized.

Returns:
The value of mInitialized

Definition at line 285 of file PCMGLXGLContext.h.

const bool & ParCompMark::GLXGLContext::getTainted (  )  const [inline]

Getter of mTainted.

Returns value of mTainted.

Returns:
The value of mTainted

Definition at line 320 of file PCMGLXGLContext.h.

inline::XVisualInfo * ParCompMark::GLXGLContext::getVisualInfo (  )  const

Getter of mVisualInfo.

Returns value of mVisualInfo.

Returns:
The value of mVisualInfo

Definition at line 306 of file PCMGLXGLContext.h.

void ParCompMark::GLXGLContext::releaseCurrent (  )  [virtual]

Release the current context without assigning a new one.

Definition at line 150 of file PCMGLXGLContext.cpp.

References Assert, Except, ParCompMark::Pointer< T, Lock >::lock(), mDisplay, mInitialized, and ParCompMark::Pointer< T, Lock >::unlock().

Here is the call graph for this function:

void ParCompMark::GLXGLContext::setCurrent (  )  [virtual]

Enable the context.

All subsequent rendering commands will go here.

Definition at line 136 of file PCMGLXGLContext.cpp.

References Assert, Except, ParCompMark::GLXRenderWindow::getWindow(), ParCompMark::Pointer< T, Lock >::lock(), mDisplay, mGLXContext, mGLXWindow, mInitialized, and ParCompMark::Pointer< T, Lock >::unlock().

Here is the call graph for this function:

void ParCompMark::GLXGLContext::setTainted ( const bool &  tainted  )  [inline]

Setter of mTainted.

Sets value of mTainted.

Parameters:
[in] tainted The value of mTainted

Definition at line 327 of file PCMGLXGLContext.h.


Member Data Documentation

Corresponding X Display.

Remarks:
This is own attribute of this class.

Definition at line 101 of file PCMGLXGLContext.h.

Referenced by finalize(), initialize(), releaseCurrent(), and setCurrent().

::GLXContext ParCompMark::GLXGLContext::mGLXContext [protected]

Wrapped GLX context.

Remarks:
This is own attribute of this class.

Definition at line 122 of file PCMGLXGLContext.h.

Referenced by finalize(), GLXGLContext(), initialize(), and setCurrent().

Corresponding GLX rendering window.

Remarks:
This attribute references an attribute.

Definition at line 108 of file PCMGLXGLContext.h.

Referenced by finalize(), GLXGLContext(), initialize(), setCurrent(), and ~GLXGLContext().

The context is initialized.

Remarks:
This is own attribute of this class.

Definition at line 94 of file PCMGLXGLContext.h.

Referenced by finalize(), GLXGLContext(), initialize(), releaseCurrent(), setCurrent(), and ~GLXGLContext().

The GLXContext attribute is maintaned by another code (In our case the PC library).

Remarks:
This is own attribute of this class.

Definition at line 129 of file PCMGLXGLContext.h.

Referenced by finalize(), and GLXGLContext().

::XVisualInfo* ParCompMark::GLXGLContext::mVisualInfo [protected]

Visual info for the context.

Remarks:
This is own attribute of this class.

Definition at line 115 of file PCMGLXGLContext.h.

Referenced by GLXGLContext(), initialize(), and ~GLXGLContext().


The documentation for this class was generated from the following files: