public void RequestPBuffer( PixelComponentType ctype, int width, int height )
{
PBRef current = _pixelBuffers[ (int)ctype ];
// Check size
if ( current.Buffer != null )
{
if ( current.Buffer.Width < width ||
current.Buffer.Height < height )
{
// If the current PBuffer is too small, destroy it and create a new one
//current.Buffer.Dispose();
current.Buffer = null;
}
}
if ( current.Buffer == null )
{
// Create pbuffer via rendersystem
current.Buffer = this._support.CreatePixelBuffer( ctype, width, height );
}
++current.ReferenceCount;
_pixelBuffers[ (int)ctype ] = current;
}