C# Class Axiom.RenderSystems.OpenGL.GLContext

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.
Inheritance: IDisposable
Show file Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
Clone ( ) : GLContext

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

The caller is responsible for deleting the returned context.

Dispose ( ) : void
EndCurrent ( ) : void

This is called before another context is made current. By default, nothing is done here.

GLContext ( ) : System
ReleaseContext ( ) : void
SetCurrent ( ) : void

Enable the context. All subsequent rendering commands will go here.

Protected Methods

Method Description
dispose ( bool disposeManagedResources ) : void

Class level dispose method

When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }

Method Details

Clone() public abstract method

Create a new context based on the same window/pbuffer as this context - mostly useful for additional threads.
The caller is responsible for deleting the returned context.
public abstract Clone ( ) : GLContext
return GLContext

Dispose() public method

public Dispose ( ) : void
return void

EndCurrent() public method

This is called before another context is made current. By default, nothing is done here.
public EndCurrent ( ) : void
return void

GLContext() public method

public GLContext ( ) : System
return System

ReleaseContext() public method

public ReleaseContext ( ) : void
return void

SetCurrent() public abstract method

Enable the context. All subsequent rendering commands will go here.
public abstract SetCurrent ( ) : void
return void

dispose() protected method

Class level dispose method
When implementing this method in an inherited class the following template should be used; protected override void dispose( bool disposeManagedResources ) { if ( !isDisposed ) { if ( disposeManagedResources ) { // Dispose managed resources. } // There are no unmanaged resources to release, but // if we add them, they need to be released here. } // If it is available, make the call to the // base class's Dispose(Boolean) method base.dispose( disposeManagedResources ); }
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool True if Unmanaged resources should be released.
return void