public GLContext GetContextFor( PixelComponentType pcType, int width, int height )
{
// Faster to return main context if the RTT is smaller than the window size
// and pcType is PixelComponentType.Byte. This must be checked every time because the window might have been resized
if ( pcType == PixelComponentType.Byte )
{
if ( width <= this._mainWindow.Width && height <= this._mainWindow.Height )
return this._mainGLContext;
}
Debug.Assert( pBuffers[ (int)pcType ].PixelBuffer != null );
return pBuffers[ (int)pcType ].PixelBuffer.Context;
}