private FBO createFramebuffer(int width, int height) { FBO ret = new FBO(width, height, FramebufferAttachment.ColorAttachment0, PixelInternalFormat.Rgba8, false); Gl.BindTexture(TextureTarget.Texture2D, ret.TextureID[0]); Gl.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, TextureParameter.Nearest); Gl.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, TextureParameter.Nearest); return ret; }
public void Dispose() { if (fbo != null) { fbo.Dispose(); fbo = null; } }
public void resize(int width, int height) { Dispose(); fbo = createFramebuffer(width, height); }