Exemple #1
0
 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;
 }
Exemple #2
0
 public void Dispose()
 {
     if (fbo != null)
     {
         fbo.Dispose();
         fbo = null;
     }
 }
Exemple #3
0
 public void resize(int width, int height)
 {
     Dispose();
     fbo = createFramebuffer(width, height);
 }