Public Member Functions | Public Attributes | Protected Attributes | Private Types | Private Member Functions | Private Attributes
Ogre::GLXGLSupport Class Reference

#include <OgreGLXGLSupport.h>

Inheritance diagram for Ogre::GLXGLSupport:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GLXGLSupport ()
 ~GLXGLSupport ()
void addConfig (void)
String validateConfig (void)
void setConfigOption (const String &name, const String &value)
RenderWindowcreateWindow (bool autoCreateWindow, GLRenderSystem *renderSystem, const String &windowTitle)
RenderWindownewWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
GLPBuffercreatePBuffer (PixelComponentType format, size_t width, size_t height)
void start ()
void stop ()
void initialiseExtensions ()
void * getProcAddress (const String &procname)
String getDisplayName (void)
 Get the name of the display and screen used for rendering.
Display * getGLDisplay (void)
 Get the Display connection used for rendering.
Display * getXDisplay (void)
 Get the Display connection used for window management & events.
void switchMode (uint &width, uint &height, short &frequency)
 Switch video modes.
void switchMode (void)
 Switch back to original video mode.
bool loadIcon (const std::string &name, Pixmap *pix, Pixmap *mask)
 Loads an icon from an Ogre resource into the X Server.
GLXFBConfig getFBConfigFromContext (::GLXContext context)
 Get the GLXFBConfig used to create a ::GLXContext.
GLXFBConfig getFBConfigFromDrawable (GLXDrawable drawable, unsigned int *width, unsigned int *height)
 Get the GLXFBConfig used to create a GLXDrawable.
GLXFBConfig selectFBConfig (const int *minAttribs, const int *maxAttribs)
 Select an FBConfig given a list of required and a list of desired properties.
GLXFBConfig getFBConfigFromVisualID (VisualID visualid)
 Gets a GLXFBConfig compatible with a VisualID.
GLXFBConfig * chooseFBConfig (const GLint *attribList, GLint *nElements)
 Portable replacement for glXChooseFBConfig.
::GLXContext createNewContext (GLXFBConfig fbConfig, GLint renderType,::GLXContext shareList, GLboolean direct) const
 Portable replacement for glXCreateNewContext.
GLint getFBConfigAttrib (GLXFBConfig fbConfig, GLint attribute, GLint *value)
 Portable replacement for glXGetFBConfigAttrib.
XVisualInfo * getVisualFromFBConfig (GLXFBConfig fbConfig)
 Portable replacement for glXGetVisualFromFBConfig.
virtual ConfigOptionMapgetConfigOptions (void)
virtual bool supportsPBuffers ()
const StringgetGLVendor (void) const
 Get vendor information.
const StringgetGLVersion (void) const
 Get version information.
bool checkMinGLVersion (const String &v) const
 Compare GL version numbers.
virtual bool checkExtension (const String &ext) const
 Check if an extension is available.
virtual unsigned int getDisplayMonitorCount () const

Public Attributes

Atom mAtomDeleteWindow
Atom mAtomFullScreen
Atom mAtomState

Protected Attributes

ConfigOptionMap mOptions
set< String >::type extensionList

Private Types

typedef std::pair< uint, uintScreenSize
typedef short Rate
typedef std::pair< ScreenSize,
Rate
VideoMode
typedef std::vector< VideoModeVideoModes

Private Member Functions

void initialiseGLXEW (void)
 Initialise GLXEW without requiring a current GL context.
void refreshConfig (void)
 Refresh config options to reflect dependencies.

Private Attributes

Display * mGLDisplay
Display * mXDisplay
bool mIsExternalDisplay
VideoModes mVideoModes
VideoMode mOriginalMode
VideoMode mCurrentMode
StringVector mSampleLevels

Detailed Description

Definition at line 11 of file OgreGLXGLSupport.h.


Member Typedef Documentation

typedef short Ogre::GLXGLSupport::Rate [private]

Definition at line 189 of file OgreGLXGLSupport.h.

typedef std::pair<uint, uint> Ogre::GLXGLSupport::ScreenSize [private]

Definition at line 188 of file OgreGLXGLSupport.h.

typedef std::pair<ScreenSize, Rate> Ogre::GLXGLSupport::VideoMode [private]

Definition at line 190 of file OgreGLXGLSupport.h.

typedef std::vector<VideoMode> Ogre::GLXGLSupport::VideoModes [private]

Definition at line 191 of file OgreGLXGLSupport.h.


Constructor & Destructor Documentation


Member Function Documentation

void Ogre::GLXGLSupport::addConfig ( void  ) [virtual]
virtual bool Ogre::GLSupport::checkExtension ( const String ext) const [virtual, inherited]

Check if an extension is available.

Reimplemented in Ogre::GTKGLSupport.

bool Ogre::GLSupport::checkMinGLVersion ( const String v) const [inherited]

Compare GL version numbers.

Reimplemented in Ogre::GTKGLSupport.

GLXFBConfig* Ogre::GLXGLSupport::chooseFBConfig ( const GLint *  attribList,
GLint *  nElements 
)

Portable replacement for glXChooseFBConfig.

::GLXContext Ogre::GLXGLSupport::createNewContext ( GLXFBConfig  fbConfig,
GLint  renderType,
::GLXContext  shareList,
GLboolean  direct 
) const

Portable replacement for glXCreateNewContext.

GLPBuffer* Ogre::GLXGLSupport::createPBuffer ( PixelComponentType  format,
size_t  width,
size_t  height 
) [virtual]

Reimplemented from Ogre::GLSupport.

RenderWindow* Ogre::GLXGLSupport::createWindow ( bool  autoCreateWindow,
GLRenderSystem renderSystem,
const String windowTitle 
) [virtual]

Implements Ogre::GLSupport.

virtual ConfigOptionMap& Ogre::GLSupport::getConfigOptions ( void  ) [virtual, inherited]
virtual unsigned int Ogre::GLSupport::getDisplayMonitorCount ( ) const [virtual, inherited]

Gets the number of display monitors.

See also:
Root::getDisplayMonitorCount

Reimplemented in Ogre::Win32GLSupport.

Definition at line 118 of file OgreGLSupport.h.

Get the name of the display and screen used for rendering.

Ogre normally opens its own connection to the X server and renders onto the screen where the user logged in

However, if Ogre is passed a current GL context when the first RenderTarget is created, then it will connect to the X server using the same connection as that GL context and direct all subsequent rendering to the screen targeted by that GL context.

Returns:
Display name.
GLint Ogre::GLXGLSupport::getFBConfigAttrib ( GLXFBConfig  fbConfig,
GLint  attribute,
GLint *  value 
)

Portable replacement for glXGetFBConfigAttrib.

Get the GLXFBConfig used to create a ::GLXContext.

Parameters:
drawableGLXContext
Returns:
GLXFBConfig used to create the context
GLXFBConfig Ogre::GLXGLSupport::getFBConfigFromDrawable ( GLXDrawable  drawable,
unsigned int *  width,
unsigned int *  height 
)

Get the GLXFBConfig used to create a GLXDrawable.

Caveat: GLX version 1.3 is needed when the drawable is a GLXPixmap

Parameters:
drawableGLXDrawable
widthReceiver for the drawable width
heightReceiver for the drawable height
Returns:
GLXFBConfig used to create the drawable
GLXFBConfig Ogre::GLXGLSupport::getFBConfigFromVisualID ( VisualID  visualid)

Gets a GLXFBConfig compatible with a VisualID.

Some platforms fail to implement glXGetFBconfigFromVisualSGIX as part of the GLX_SGIX_fbconfig extension, but this portable alternative suffices for the creation of compatible contexts.

Parameters:
visualidVisualID
Returns:
FBConfig for VisualID
Display* Ogre::GLXGLSupport::getGLDisplay ( void  )

Get the Display connection used for rendering.

This function establishes the initial connection when necessary.

Returns:
Display connection
const String& Ogre::GLSupport::getGLVendor ( void  ) const [inherited]

Get vendor information.

Definition at line 85 of file OgreGLSupport.h.

const String& Ogre::GLSupport::getGLVersion ( void  ) const [inherited]

Get version information.

Definition at line 93 of file OgreGLSupport.h.

void* Ogre::GLXGLSupport::getProcAddress ( const String procname) [virtual]
XVisualInfo* Ogre::GLXGLSupport::getVisualFromFBConfig ( GLXFBConfig  fbConfig)

Portable replacement for glXGetVisualFromFBConfig.

Display* Ogre::GLXGLSupport::getXDisplay ( void  )

Get the Display connection used for window management & events.

Returns:
Display connection
void Ogre::GLXGLSupport::initialiseGLXEW ( void  ) [private]

Initialise GLXEW without requiring a current GL context.

bool Ogre::GLXGLSupport::loadIcon ( const std::string &  name,
Pixmap *  pix,
Pixmap *  mask 
)

Loads an icon from an Ogre resource into the X Server.

This currently only works for 24 and 32 bit displays. The image must be findable by the Ogre resource system, and of format PF_A8R8G8B8.

Parameters:
displayX display
nameName of image to load
pixReceiver for the output pixmap
maskReceiver for the output mask (alpha bitmap)
Returns:
true on success
RenderWindow* Ogre::GLXGLSupport::newWindow ( const String name,
unsigned int  width,
unsigned int  height,
bool  fullScreen,
const NameValuePairList miscParams = 0 
) [virtual]

Implements Ogre::GLSupport.

void Ogre::GLXGLSupport::refreshConfig ( void  ) [private]

Refresh config options to reflect dependencies.

GLXFBConfig Ogre::GLXGLSupport::selectFBConfig ( const int *  minAttribs,
const int *  maxAttribs 
)

Select an FBConfig given a list of required and a list of desired properties.

Parameters:
displayX Display
minAttribsFBConfig attributes that must be provided with minimum values
maxAttribsFBConfig attributes that are desirable with maximum values
Returns:
GLXFBConfig with attributes or 0 when unsupported.
void Ogre::GLXGLSupport::setConfigOption ( const String name,
const String value 
) [virtual]
void Ogre::GLXGLSupport::start ( ) [virtual]
void Ogre::GLXGLSupport::stop ( ) [virtual]
virtual bool Ogre::GLSupport::supportsPBuffers ( ) [virtual, inherited]

Reimplemented in Ogre::Win32GLSupport, and Ogre::OSXGLSupport.

void Ogre::GLXGLSupport::switchMode ( uint width,
uint height,
short &  frequency 
)

Switch video modes.

Parameters:
widthReceiver for requested and final width
heightReceiver for requested and final drawable height
heightReceiver for requested and final drawable frequency

Switch back to original video mode.


Member Data Documentation

set<String>::type Ogre::GLSupport::extensionList [protected, inherited]

Definition at line 128 of file OgreGLSupport.h.

Definition at line 17 of file OgreGLXGLSupport.h.

Definition at line 18 of file OgreGLXGLSupport.h.

Definition at line 19 of file OgreGLXGLSupport.h.

Definition at line 195 of file OgreGLXGLSupport.h.

Display* Ogre::GLXGLSupport::mGLDisplay [private]

Definition at line 184 of file OgreGLXGLSupport.h.

Definition at line 186 of file OgreGLXGLSupport.h.

Definition at line 125 of file OgreGLSupport.h.

Definition at line 194 of file OgreGLXGLSupport.h.

Definition at line 197 of file OgreGLXGLSupport.h.

Definition at line 193 of file OgreGLXGLSupport.h.

Display* Ogre::GLXGLSupport::mXDisplay [private]

Definition at line 185 of file OgreGLXGLSupport.h.


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

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 2012 21:49:17