Esempio n. 1
0
        public void BindRenderBuffer(RenderBuffer buffer, RenderBufferConfiguration config, bool dispose = true)
        {
            Use();

            if (dispose && createdRenderBuffer && BoundRenderBuffer != null)
            {
                createdRenderBuffer = false;
                BoundRenderBuffer.Dispose();
            }

            BoundRenderBuffer = buffer;
            gl.FramebufferRenderbuffer(GLEnum.Framebuffer, config.Attachment, GLEnum.Renderbuffer, buffer.ID);
        }
Esempio n. 2
0
 public void CreateRenderBuffer(uint width, uint height, RenderBufferConfiguration config)
 {
     Use();
     BindRenderBuffer(new RenderBuffer(width, height, config.Format), config);
     createdRenderBuffer = true;
 }