OGRE-Next  3.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::GTKGLSupport Class Reference

GL support in a GTK window. More...

#include <OgreGTKGLSupport.h>

+ Inheritance diagram for Ogre::GTKGLSupport:

Public Member Functions

 GTKGLSupport ()
 
void addConfig ()
 Add any special config values to the system. More...
 
void begin_context (RenderTarget *_target=0)
 
bool checkExtension (const String &ext) const
 Check if an extension is available. More...
 
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. More...
 
void initialiseExtensions ()
 Initialises GL extensions, must be done AFTER the GL context has been established. More...
 
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. More...
 
void stop ()
 Stop anything special. More...
 
String validateConfig ()
 Make sure all the extra options are valid. More...
 
- Public Member Functions inherited from Ogre::GL3PlusSupport
 GL3PlusSupport ()
 
virtual ~GL3PlusSupport ()
 
virtual ConfigOptionMapgetConfigOptions ()
 
virtual unsigned int getDisplayMonitorCount () const
 Gets the number of display monitors. More...
 
const StringgetGLVendor () const
 Get vendor information. More...
 
const DriverVersiongetGLVersion () const
 Get version information. More...
 
virtual size_t getNumPriorityConfigOptions () const
 
virtual const char * getPriorityConfigOption (size_t idx) const
 
const StringgetShaderCachePath () const
 Get shader cache path. More...
 
const StringgetShaderLibraryPath () const
 Get shader library path. More...
 
bool hasMinGLVersion (int major, int minor) const
 Check if GL Version is supported. More...
 
virtual WindownewWindow (const String &name, uint32 width, uint32 height, bool fullScreen, const NameValuePairList *miscParams=0)=0
 Creates a new rendering window. More...
 
virtual void setConfigOption (const String &name, const String &value)
 
void setShaderCachePath (String path)
 Set shader cache path. More...
 
void setShaderLibraryPath (String path)
 Set shader library path. More...
 
- Public Member Functions inherited from Ogre::Singleton< GTKGLSupport >
 Singleton ()
 
 ~Singleton ()
 

Static Public Member Functions

static GTKGLSupportgetSingleton ()
 Override standard Singleton retrieval. More...
 
static GTKGLSupportgetSingletonPtr ()
 Override standard Singleton retrieval. More...
 
- Static Public Member Functions inherited from Ogre::Singleton< GTKGLSupport >
static GTKGLSupportgetSingleton ()
 
static GTKGLSupportgetSingletonPtr ()
 

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 ( )

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()

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

◆ getSingletonPtr()

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

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