#include <OgreGLXGLSupport.h>
Public Member Functions | |
GLXGLSupport () | |
~GLXGLSupport () | |
void | addConfig (void) |
String | validateConfig (void) |
void | setConfigOption (const String &name, const String &value) |
RenderWindow * | createWindow (bool autoCreateWindow, GLRenderSystem *renderSystem, const String &windowTitle) |
RenderWindow * | newWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0) |
GLPBuffer * | createPBuffer (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 ConfigOptionMap & | getConfigOptions (void) |
virtual bool | supportsPBuffers () |
const String & | getGLVendor (void) const |
Get vendor information. | |
const String & | getGLVersion (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, uint > | ScreenSize |
typedef short | Rate |
typedef std::pair< ScreenSize, Rate > | VideoMode |
typedef std::vector< VideoMode > | VideoModes |
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 |
Definition at line 11 of file OgreGLXGLSupport.h.
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.
void Ogre::GLXGLSupport::addConfig | ( | void | ) | [virtual] |
Implements Ogre::GLSupport.
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.
Reimplemented in Ogre::Win32GLSupport.
Definition at line 118 of file OgreGLSupport.h.
String Ogre::GLXGLSupport::getDisplayName | ( | void | ) |
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.
GLint Ogre::GLXGLSupport::getFBConfigAttrib | ( | GLXFBConfig | fbConfig, |
GLint | attribute, | ||
GLint * | value | ||
) |
Portable replacement for glXGetFBConfigAttrib.
GLXFBConfig Ogre::GLXGLSupport::getFBConfigFromContext | ( | ::GLXContext | context | ) |
Get the GLXFBConfig used to create a ::GLXContext.
drawable | GLXContext |
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
drawable | GLXDrawable |
width | Receiver for the drawable width |
height | Receiver for the drawable height |
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.
visualid | VisualID |
Display* Ogre::GLXGLSupport::getGLDisplay | ( | void | ) |
Get the Display connection used for rendering.
This function establishes the initial connection when necessary.
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] |
Implements Ogre::GLSupport.
XVisualInfo* Ogre::GLXGLSupport::getVisualFromFBConfig | ( | GLXFBConfig | fbConfig | ) |
Portable replacement for glXGetVisualFromFBConfig.
Display* Ogre::GLXGLSupport::getXDisplay | ( | void | ) |
Get the Display connection used for window management & events.
void Ogre::GLXGLSupport::initialiseExtensions | ( | ) | [virtual] |
Reimplemented from Ogre::GLSupport.
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.
display | X display |
name | Name of image to load |
pix | Receiver for the output pixmap |
mask | Receiver for the output mask (alpha bitmap) |
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.
display | X Display |
minAttribs | FBConfig attributes that must be provided with minimum values |
maxAttribs | FBConfig attributes that are desirable with maximum values |
void Ogre::GLXGLSupport::setConfigOption | ( | const String & | name, |
const String & | value | ||
) | [virtual] |
Reimplemented from Ogre::GLSupport.
void Ogre::GLXGLSupport::start | ( | ) | [virtual] |
Implements Ogre::GLSupport.
void Ogre::GLXGLSupport::stop | ( | ) | [virtual] |
Implements Ogre::GLSupport.
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.
width | Receiver for requested and final width |
height | Receiver for requested and final drawable height |
height | Receiver for requested and final drawable frequency |
void Ogre::GLXGLSupport::switchMode | ( | void | ) |
Switch back to original video mode.
String Ogre::GLXGLSupport::validateConfig | ( | void | ) | [virtual] |
Implements Ogre::GLSupport.
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.
VideoMode Ogre::GLXGLSupport::mCurrentMode [private] |
Definition at line 195 of file OgreGLXGLSupport.h.
Display* Ogre::GLXGLSupport::mGLDisplay [private] |
Definition at line 184 of file OgreGLXGLSupport.h.
bool Ogre::GLXGLSupport::mIsExternalDisplay [private] |
Definition at line 186 of file OgreGLXGLSupport.h.
ConfigOptionMap Ogre::GLSupport::mOptions [protected, inherited] |
Definition at line 125 of file OgreGLSupport.h.
VideoMode Ogre::GLXGLSupport::mOriginalMode [private] |
Definition at line 194 of file OgreGLXGLSupport.h.
Definition at line 197 of file OgreGLXGLSupport.h.
VideoModes Ogre::GLXGLSupport::mVideoModes [private] |
Definition at line 193 of file OgreGLXGLSupport.h.
Display* Ogre::GLXGLSupport::mXDisplay [private] |
Definition at line 185 of file OgreGLXGLSupport.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Fri May 25 2012 21:49:17