Axiom.RenderSystems.OpenGLES.GLESPBRTTManager.RequestPBuffer C# (CSharp) Method

RequestPBuffer() public method

public RequestPBuffer ( PixelComponentType ctype, int width, int height ) : void
ctype PixelComponentType
width int
height int
return void
		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;
		}