protected FrameBuffer(int width, int height, FramebufferAttachment framebufferAttachment, TextureOptions options) { GLFramebuffer = new GLFramebuffer(); GLTexture = new GLTexture2D(width, height, options: options); GLFramebuffer.Bind(); GLFramebuffer.SetTexture(GLTexture, framebufferAttachment); InitializeReadBuffer(width, height); InitializeDrawBuffer(width, height); GLFramebuffer.Unbind(); }
public void Bind() { GLFramebuffer.Bind(); GL.Viewport(0, 0, GLTexture.Width, GLTexture.Height); }