Axiom.RenderSystems.OpenGLES.GLESRenderBuffer.GLESRenderBuffer C# (CSharp) Method

GLESRenderBuffer() public method

public GLESRenderBuffer ( All format, int width, int height, int numSamples ) : System
format All
width int
height int
numSamples int
return System
		public GLESRenderBuffer( All format, int width, int height, int numSamples )
			: base( width, height, 1, GLESPixelUtil.GetClosestAxiomFormat( format ), BufferUsage.WriteOnly )
		{
			_glInternalFormat = format;
			/// Generate renderbuffer
			OpenGLOES.GenRenderbuffers( 1, ref _renderbufferID );
			GLESConfig.GlCheckError( this );
			/// Bind it to FBO
			OpenGLOES.BindRenderbuffer( All.RenderbufferOes, _renderbufferID );
			GLESConfig.GlCheckError( this );

			/// Allocate storage for depth buffer
			if ( numSamples <= 0 )
			{
				OpenGLOES.RenderbufferStorage( All.RenderbufferOes, format, width, height );
				GLESConfig.GlCheckError( this );
			}
		}