package electrosphere.renderer.framebuffer;

import static org.lwjgl.opengl.GL30.GL_RENDERBUFFER;
import static org.lwjgl.opengl.GL30.glBindRenderbuffer;
import static org.lwjgl.opengl.GL30.glDeleteRenderbuffers;
import static org.lwjgl.opengl.GL30.glGenRenderbuffers;

/**
 *
 * @author amaterasu
 */
public class Renderbuffer {
    int renderbuffer;
    
    public Renderbuffer(){
        renderbuffer = glGenRenderbuffers();
    }
    
    public void bind(){
        glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
    }
    
    public int getFramebufferID(){
        return renderbuffer;
    }
    
    public void free(){
        glDeleteRenderbuffers(renderbuffer);
    }
}
