OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::GLXGLSupport Class Reference

#include <OgreGLXGLSupport.h>

+ Inheritance diagram for Ogre::GLXGLSupport:

Public Member Functions

 GLXGLSupport ()
 
 ~GLXGLSupport ()
 
void addConfig (void)
 GL3PlusSupport::addConfig
 
virtual bool checkExtension (const String &ext) const
 Check if an extension is available.
 
GLXFBConfigchooseFBConfig (const GLint *attribList, GLint *nElements)
 Portable replacement for glXChooseFBConfig.
 
::GLXContext createNewContext (GLXFBConfig fbConfig, GLint renderType, ::GLXContext shareList, GLboolean direct) const
 Portable replacement for glXCreateNewContext.
 
RenderWindowcreateWindow (bool autoCreateWindow, GL3PlusRenderSystem *renderSystem, const String &windowTitle)
 
virtual ConfigOptionMapgetConfigOptions (void)
 
virtual unsigned int getDisplayMonitorCount () const
 Gets the number of display monitors.
 
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.
 
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 getFBConfigFromVisualID (VisualID visualid)
 Gets a GLXFBConfig compatible with a VisualID.
 
DisplaygetGLDisplay (void)
 Get the Display connection used for rendering.
 
const StringgetGLVendor (void) const
 Get vendor information.
 
const DriverVersiongetGLVersion (void) const
 Get version information.
 
voidgetProcAddress (const char *procname) const
 GL3PlusSupport::getProcAddress
 
const StringgetShaderCachePath (void) const
 Get shader cache path.
 
const StringgetShaderLibraryPath (void) const
 Get shader library path.
 
XVisualInfogetVisualFromFBConfig (GLXFBConfig fbConfig)
 Portable replacement for glXGetVisualFromFBConfig.
 
DisplaygetXDisplay (void)
 Get the Display connection used for window management & events.
 
bool hasMinGLVersion (int major, int minor) const
 Check if GL Version is supported.
 
void initialiseExtensions ()
 GL3PlusSupport::initialiseExtensions
 
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)
 
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)
 GL3PlusSupport::setConfigOption
 
void setShaderCachePath (String path)
 Set shader cache path.
 
void setShaderLibraryPath (String path)
 Set shader library path.
 
void start ()
 GL3PlusSupport::start
 
void stop ()
 GL3PlusSupport::stop
 
void switchMode (uint &width, uint &height, short &frequency)
 Switch video modes.
 
void switchMode (void)
 Switch back to original video mode.
 
String validateConfig (void)
 GL3PlusSupport::validateConfig
 

Public Attributes

Atom mAtomDeleteWindow
 
Atom mAtomFullScreen
 
Atom mAtomState
 

Constructor & Destructor Documentation

◆ GLXGLSupport()

Ogre::GLXGLSupport::GLXGLSupport ( )

◆ ~GLXGLSupport()

Ogre::GLXGLSupport::~GLXGLSupport ( )

Member Function Documentation

◆ addConfig()

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

◆ checkExtension()

virtual bool Ogre::GL3PlusSupport::checkExtension ( const String ext) const
virtualinherited

Check if an extension is available.

Reimplemented in Ogre::GTKGLSupport.

◆ chooseFBConfig()

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

Portable replacement for glXChooseFBConfig.

◆ createNewContext()

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

Portable replacement for glXCreateNewContext.

◆ createWindow()

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

Implements Ogre::GL3PlusSupport.

◆ getConfigOptions()

virtual ConfigOptionMap & Ogre::GL3PlusSupport::getConfigOptions ( void  )
virtualinherited

◆ getDisplayMonitorCount()

virtual unsigned int Ogre::GL3PlusSupport::getDisplayMonitorCount ( ) const
inlinevirtualinherited

Gets the number of display monitors.

See also
Root::getDisplayMonitorCount

Reimplemented in Ogre::Win32GLSupport.

◆ getDisplayName()

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.

Returns
Display name.

◆ getFBConfigAttrib()

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

Portable replacement for glXGetFBConfigAttrib.

◆ getFBConfigFromContext()

GLXFBConfig Ogre::GLXGLSupport::getFBConfigFromContext ( ::GLXContext  context)

Get the GLXFBConfig used to create a ::GLXContext.

Parameters
drawableGLXContext
Returns
GLXFBConfig used to create the context

◆ getFBConfigFromDrawable()

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

◆ getFBConfigFromVisualID()

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

◆ getGLDisplay()

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

Get the Display connection used for rendering.

This function establishes the initial connection when necessary.

Returns
Display connection

◆ getGLVendor()

const String & Ogre::GL3PlusSupport::getGLVendor ( void  ) const
inlineinherited

Get vendor information.

◆ getGLVersion()

const DriverVersion & Ogre::GL3PlusSupport::getGLVersion ( void  ) const
inlineinherited

Get version information.

◆ getProcAddress()

void * Ogre::GLXGLSupport::getProcAddress ( const char procname) const
virtual

◆ getShaderCachePath()

const String & Ogre::GL3PlusSupport::getShaderCachePath ( void  ) const
inlineinherited

Get shader cache path.

◆ getShaderLibraryPath()

const String & Ogre::GL3PlusSupport::getShaderLibraryPath ( void  ) const
inlineinherited

Get shader library path.

◆ getVisualFromFBConfig()

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

Portable replacement for glXGetVisualFromFBConfig.

◆ getXDisplay()

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

Get the Display connection used for window management & events.

Returns
Display connection

◆ hasMinGLVersion()

bool Ogre::GL3PlusSupport::hasMinGLVersion ( int  major,
int  minor 
) const
inherited

Check if GL Version is supported.

◆ initialiseExtensions()

void Ogre::GLXGLSupport::initialiseExtensions ( )
virtual

◆ loadIcon()

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

◆ newWindow()

RenderWindow * Ogre::GLXGLSupport::newWindow ( const String name,
unsigned int  width,
unsigned int  height,
bool  fullScreen,
const NameValuePairList miscParams = 0 
)
virtual

Implements Ogre::GL3PlusSupport.

◆ selectFBConfig()

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.

◆ setConfigOption()

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

◆ setShaderCachePath()

void Ogre::GL3PlusSupport::setShaderCachePath ( String  path)
inlineinherited

Set shader cache path.

◆ setShaderLibraryPath()

void Ogre::GL3PlusSupport::setShaderLibraryPath ( String  path)
inlineinherited

Set shader library path.

◆ start()

void Ogre::GLXGLSupport::start ( )
virtual

◆ stop()

void Ogre::GLXGLSupport::stop ( )
virtual

◆ switchMode() [1/2]

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

◆ switchMode() [2/2]

void Ogre::GLXGLSupport::switchMode ( void  )

Switch back to original video mode.

◆ validateConfig()

String Ogre::GLXGLSupport::validateConfig ( void  )
virtual

Member Data Documentation

◆ mAtomDeleteWindow

Atom Ogre::GLXGLSupport::mAtomDeleteWindow

◆ mAtomFullScreen

Atom Ogre::GLXGLSupport::mAtomFullScreen

◆ mAtomState

Atom Ogre::GLXGLSupport::mAtomState

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