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

Public Attributes

Atom mAtomDeleteWindow
Atom mAtomFullScreen
Atom mAtomState

Protected Attributes

set< String >::type extensionList
set< String >::type extensionList
ConfigOptionMap mOptions
ConfigOptionMap mOptions

Private Types

typedef short Rate
typedef short Rate
typedef std::pair< uint, uintScreenSize
typedef std::pair< uint, uintScreenSize
typedef std::pair< ScreenSize,
Rate
VideoMode
typedef std::pair< ScreenSize,
Rate
VideoMode
typedef std::vector< VideoModeVideoModes
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.
void refreshConfig (void)
 Refresh config options to reflect dependencies.

Private Attributes

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

Detailed Description

Definition at line 11 of file include/GLX/OgreGLXGLSupport.h.


Member Typedef Documentation

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

Definition at line 187 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 205 of file Plus/include/GLX/OgreGLXGLSupport.h.

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

Definition at line 186 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 204 of file Plus/include/GLX/OgreGLXGLSupport.h.

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

Definition at line 188 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 206 of file Plus/include/GLX/OgreGLXGLSupport.h.

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

Definition at line 189 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 207 of file Plus/include/GLX/OgreGLXGLSupport.h.


Constructor & Destructor Documentation


Member Function Documentation

void Ogre::GLXGLSupport::addConfig ( void  ) [virtual]

Add any special config values to the system.

Must have a "Full Screen" value that is a bool and a "Video Mode" value that is a string in the form of wxh

Implements Ogre::GLSupport.

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, and Ogre::GTKGLSupport.

virtual bool Ogre::GL3PlusSupport::checkExtension ( const String ext) const [virtual, inherited]

Check if an extension is available.

Reimplemented in Ogre::GTKGLSupport, and Ogre::GTKGLSupport.

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

Compare GL version numbers.

Reimplemented in Ogre::GTKGLSupport, and Ogre::GTKGLSupport.

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

Compare GL version numbers.

Reimplemented in Ogre::GTKGLSupport, and Ogre::GTKGLSupport.

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

Portable replacement for glXChooseFBConfig.

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.

::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.

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

Implements Ogre::GL3PlusSupport.

virtual ConfigOptionMap& Ogre::GL3PlusSupport::getConfigOptions ( void  ) [virtual, inherited]
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, and Ogre::Win32GLSupport.

Definition at line 130 of file OgreGLSupport.h.

virtual unsigned int Ogre::GL3PlusSupport::getDisplayMonitorCount ( ) const [virtual, inherited]

Gets the number of display monitors.

See also:
Root::getDisplayMonitorCount

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

Definition at line 139 of file OgreGL3PlusSupport.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.

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.

GLint Ogre::GLXGLSupport::getFBConfigAttrib ( GLXFBConfig  fbConfig,
GLint  attribute,
GLint *  value 
)

Portable replacement for glXGetFBConfigAttrib.

Get the GLXFBConfig used to create a GLXContext.

Parameters:
contextGLXContext
Returns:
GLXFBConfig used to create the context

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::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
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
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::GL3PlusSupport::getGLVendor ( void  ) const [inherited]

Get vendor information.

Definition at line 73 of file OgreGL3PlusSupport.h.

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

Get vendor information.

Definition at line 97 of file OgreGLSupport.h.

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

Get version information.

Definition at line 81 of file OgreGL3PlusSupport.h.

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

Get version information.

Definition at line 105 of file OgreGLSupport.h.

void* Ogre::GLXGLSupport::getProcAddress ( const String procname) [virtual]

Get the address of a function.

Implements Ogre::GLSupport.

void* Ogre::GLXGLSupport::getProcAddress ( const String procname) [virtual]
const String& Ogre::GL3PlusSupport::getShaderCachePath ( void  ) const [inherited]

Get shader cache path.

Definition at line 89 of file OgreGL3PlusSupport.h.

const String& Ogre::GL3PlusSupport::getShaderLibraryPath ( void  ) const [inherited]

Get shader library path.

Definition at line 97 of file OgreGL3PlusSupport.h.

Definition at line 75 of file OgreGLSupport.h.

XVisualInfo* Ogre::GLXGLSupport::getVisualFromFBConfig ( GLXFBConfig  fbConfig)

Portable replacement for glXGetVisualFromFBConfig.

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
Display* Ogre::GLXGLSupport::getXDisplay ( void  )

Get the Display connection used for window management & events.

Returns:
Display connection

Initialises GL extensions, must be done AFTER the GL context has been established.

Reimplemented from Ogre::GLSupport.

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

Initialise GLXEW without requiring a current GL context.

bool Ogre::GLXGLSupport::loadIcon ( const 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:
nameName of image to load
pixReceiver for the output pixmap
maskReceiver for the output mask (alpha bitmap)
Returns:
true on success
bool Ogre::GLXGLSupport::loadIcon ( const 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.

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.

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:
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.
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:
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]

Reimplemented from Ogre::GLSupport.

void Ogre::GLXGLSupport::setConfigOption ( const String name,
const String value 
) [virtual]

Set shader cache path.

Definition at line 105 of file OgreGL3PlusSupport.h.

Set shader library path.

Definition at line 113 of file OgreGL3PlusSupport.h.

void Ogre::GLSupport::setStateCacheManager ( GLStateCacheManager stateCacheMgr) [inherited]

Definition at line 80 of file OgreGLSupport.h.

void Ogre::GLXGLSupport::start ( ) [virtual]

Start anything special.

Implements Ogre::GLSupport.

void Ogre::GLXGLSupport::start ( ) [virtual]
void Ogre::GLXGLSupport::stop ( ) [virtual]

Stop anything special.

Implements Ogre::GLSupport.

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
frequencyReceiver for requested and final drawable frequency

Switch back to original video mode.

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.

Make sure all the extra options are valid.

Returns:
string with error message

Implements Ogre::GLSupport.


Member Data Documentation

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

Definition at line 140 of file OgreGLSupport.h.

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

Definition at line 164 of file OgreGL3PlusSupport.h.

Definition at line 17 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 18 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 19 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 193 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 182 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 184 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 137 of file OgreGLSupport.h.

Definition at line 161 of file OgreGL3PlusSupport.h.

Definition at line 192 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 195 of file include/GLX/OgreGLXGLSupport.h.

Definition at line 191 of file include/GLX/OgreGLXGLSupport.h.

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

Definition at line 183 of file include/GLX/OgreGLXGLSupport.h.


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

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 Mon Jul 27 2020 13:41:13