OGRE-Next: Ogre::GTKGLSupport Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::GTKGLSupport Class Reference

GL support in a GTK window. More...

`#include <OgreGTKGLSupport.h>`

Inheritance diagram for Ogre::GTKGLSupport:
[legend]

## Public Member Functions
| GTKGLSupport ()
void | addConfig ()
| Add any special config values to the system.
void | begin_context (RenderTarget *_target=0)
bool | checkExtension (const String &ext) const
| Check if an extension is available.
bool | checkMinGLVersion (const String &v) const
RenderWindow * | createWindow (bool autoCreateWindow, GL3PlusRenderSystem *renderSystem, const String &windowTitle)
void | end_context ()
Glib::RefPtr< const Gdk::GL::Context > | getMainContext () const
void * | getProcAddress (const char *procname) const
| Get the address of a function.
void | initialiseExtensions ()
| Initialises GL extensions, must be done AFTER the GL context has been established.
RenderWindow * | newWindow (const String &name, unsigned int width, unsigned int height, unsigned int colourDepth, bool fullScreen, int left, int top, bool depthBuffer, RenderWindow *parentWindowHandle, bool vsync)
void | setConfigOptions (const String &name, const String &value)
void | start ()
| Start anything special.
void | stop ()
| Stop anything special.
String | validateConfig ()
| Make sure all the extra options are valid.
Public Member Functions inherited from Ogre::GL3PlusSupport
| GL3PlusSupport ()
virtual | ~GL3PlusSupport ()
virtual ConfigOptionMap & | getConfigOptions ()
virtual unsigned int | getDisplayMonitorCount () const
| Gets the number of display monitors.
const String & | getGLVendor () const
| Get vendor information.
const DriverVersion & | getGLVersion () const
| Get version information.
virtual size_t | getNumPriorityConfigOptions () const
virtual const char * | getPriorityConfigOption (size_t idx) const
const String & | getShaderCachePath () const
| Get shader cache path.
const String & | getShaderLibraryPath () const
| Get shader library path.
bool | hasMinGLVersion (int major, int minor) const
| Check if GL Version is supported.
virtual Window * | newWindow (const String &name, uint32 width, uint32 height, bool fullScreen, const NameValuePairList *miscParams=0)=0
| Creates a new rendering window.
virtual void | setConfigOption (const String &name, const String &value)
void | setShaderCachePath (String path)
| Set shader cache path.
void | setShaderLibraryPath (String path)
| Set shader library path.
Public Member Functions inherited from Ogre::Singleton< GTKGLSupport >
| ~Singleton ()

## Static Public Member Functions
static GTKGLSupport & | getSingleton ()
| Override standard Singleton retrieval.
static GTKGLSupport * | getSingletonPtr ()
| Override standard Singleton retrieval.
Static Public Member Functions inherited from Ogre::Singleton< GTKGLSupport >
static GTKGLSupport & | getSingleton ()
static GTKGLSupport * | getSingletonPtr ()

## Detailed Description

GL support in a GTK window.

I made this a Singleton, so that the main context can be queried by GTKWindows.

## Constructor & Destructor Documentation

## ◆ GTKGLSupport()

Ogre::GTKGLSupport::GTKGLSupport | ( |  | ) |

Referenced by getSingleton(), and getSingletonPtr().

## Member Function Documentation

## ◆ addConfig()

void Ogre::GTKGLSupport::addConfig | ( |  | ) |
| 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::GL3PlusSupport.

## ◆ begin_context()

void Ogre::GTKGLSupport::begin_context | ( | RenderTarget * | _target = 0 | ) |

## ◆ checkExtension()

bool Ogre::GTKGLSupport::checkExtension | ( | const String & | ext | ) | const
| virtual

Check if an extension is available.

Reimplemented from Ogre::GL3PlusSupport.

## ◆ checkMinGLVersion()

bool Ogre::GTKGLSupport::checkMinGLVersion | ( | const String & | v | ) | const

## ◆ createWindow()

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

Implements Ogre::GL3PlusSupport.

## ◆ end_context()

void Ogre::GTKGLSupport::end_context | ( |  | ) |

## ◆ getMainContext()

Glib::RefPtr< const Gdk::GL::Context > Ogre::GTKGLSupport::getMainContext | ( |  | ) | const

## ◆ getProcAddress()

void * Ogre::GTKGLSupport::getProcAddress | ( | const char * | procname | ) | const
| virtual

Get the address of a function.

Implements Ogre::GL3PlusSupport.

## ◆ getSingleton()

GTKGLSupport & Ogre::GTKGLSupport::getSingleton | ( |  | ) |
| static

Override standard Singleton retrieval.

Remarks
  Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

  This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

References GTKGLSupport().

## ◆ getSingletonPtr()

GTKGLSupport * Ogre::GTKGLSupport::getSingletonPtr | ( |  | ) |
| static

Override standard Singleton retrieval.

Remarks
  Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

  This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

References GTKGLSupport().

## ◆ initialiseExtensions()

void Ogre::GTKGLSupport::initialiseExtensions | ( |  | ) |
| virtual

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

Reimplemented from Ogre::GL3PlusSupport.

## ◆ newWindow()

RenderWindow * Ogre::GTKGLSupport::newWindow | ( | const String & | name,
|  | unsigned int | width,
|  | unsigned int | height,
|  | unsigned int | colourDepth,
|  | bool | fullScreen,
|  | int | left,
|  | int | top,
|  | bool | depthBuffer,
|  | RenderWindow * | parentWindowHandle,
|  | bool | vsync )

## ◆ setConfigOptions()

void Ogre::GTKGLSupport::setConfigOptions | ( | const String & | name,
|  | const String & | value )

## ◆ start()

void Ogre::GTKGLSupport::start | ( |  | ) |
| virtual

Start anything special.

Implements Ogre::GL3PlusSupport.

## ◆ stop()

void Ogre::GTKGLSupport::stop | ( |  | ) |
| virtual

Stop anything special.

Implements Ogre::GL3PlusSupport.

## ◆ validateConfig()

String Ogre::GTKGLSupport::validateConfig | ( |  | ) |
| virtual

Make sure all the extra options are valid.

Returns
  string with error message

Implements Ogre::GL3PlusSupport.

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

- OgreGTKGLSupport.h