Public Member Functions | Protected Attributes | List of all members
Ogre::GLContext Class Referenceabstract

Class that encapsulates an GL context. More...

#include <OgreGLContext.h>

Inheritance diagram for Ogre::GLContext:
Inheritance graph
[legend]

Public Member Functions

 GLContext ()
 
virtual ~GLContext ()
 
virtual GLContextclone () const =0
 Create a new context based on the same window/pbuffer as this context - mostly useful for additional threads. More...
 
virtual void endCurrent ()=0
 This is called before another context is made current. More...
 
bool getInitialized ()
 
virtual void releaseContext ()
 Release the render context. More...
 
virtual void setCurrent ()=0
 Enable the context. More...
 
void setInitialized ()
 

Protected Attributes

bool initialized
 

Detailed Description

Class that encapsulates an GL context.

(IE a window/pbuffer). This is a virtual base class which should be implemented in a GLSupport. This object can also be used to cache renderstate if we decide to do so in the future.

Definition at line 41 of file OgreGLContext.h.

Constructor & Destructor Documentation

◆ GLContext()

Ogre::GLContext::GLContext ( )

◆ ~GLContext()

virtual Ogre::GLContext::~GLContext ( )
virtual

Member Function Documentation

◆ clone()

virtual GLContext* Ogre::GLContext::clone ( ) const
pure virtual

Create a new context based on the same window/pbuffer as this context - mostly useful for additional threads.

Note
The caller is responsible for deleting the returned context.

Implemented in Ogre::OSXContext, Ogre::OSXCarbonContext, Ogre::OSXCGLContext, Ogre::OSXCocoaContext, Ogre::GLXContext, Ogre::GLXContext, Ogre::Win32Context, and Ogre::Win32Context.

◆ endCurrent()

virtual void Ogre::GLContext::endCurrent ( )
pure virtual

This is called before another context is made current.

By default, nothing is done here.

Implemented in Ogre::OSXContext, Ogre::OSXCarbonContext, Ogre::OSXCGLContext, Ogre::OSXCocoaContext, Ogre::GLXContext, Ogre::GLXContext, Ogre::Win32Context, and Ogre::Win32Context.

◆ getInitialized()

bool Ogre::GLContext::getInitialized ( )

Definition at line 57 of file OgreGLContext.h.

◆ releaseContext()

virtual void Ogre::GLContext::releaseContext ( )
virtual

Release the render context.

Reimplemented in Ogre::Win32Context, and Ogre::Win32Context.

Definition at line 69 of file OgreGLContext.h.

◆ setCurrent()

virtual void Ogre::GLContext::setCurrent ( )
pure virtual

Enable the context.

All subsequent rendering commands will go here.

Implemented in Ogre::OSXContext, Ogre::OSXCarbonContext, Ogre::GLXContext, Ogre::OSXCGLContext, Ogre::OSXCocoaContext, Ogre::Win32Context, Ogre::GLXContext, and Ogre::Win32Context.

◆ setInitialized()

void Ogre::GLContext::setInitialized ( )

Definition at line 58 of file OgreGLContext.h.

Member Data Documentation

◆ initialized

bool Ogre::GLContext::initialized
protected

Definition at line 71 of file OgreGLContext.h.


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

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 Tue Apr 13 2021 08:53:15