zMol
A viewer for molecular data using OpenGL and ambient occlusion
|
#include <fbo.hpp>
Inherits zmol::noncopyable_::noncopyable.
Public Member Functions | |
renderbuffer (GLenum const p_format, GLsizei const p_width, GLsizei const p_height, GLsizei const p_num_antialiasing_samples) | |
~renderbuffer () | |
GLuint | get_name () const |
void | bind () |
void | unbind () |
Renderbuffer wrapper class.
The class creates a renderbuffer in the constructor, and destroys it in the destructor. This makes proper use of the C++ RAII idiom, and ensures exception safety (-> no resource leak).
|
explicit |
Constructor. Creates the renderbuffer using glGenRenderbuffers().
p_format | Pixel format of the renderbuffer. |
p_width | Width of the renderbuffer, in pixels. |
p_height | Height of the renderbuffer, in pixels. |
p_num_antialiasing_samples | Number of antialiasing samples. Set this to 0 to disable antialiasing in this renderbuffer. |
zmol::renderbuffer::~renderbuffer | ( | ) |
Destructor. Destroys the renderbuffer using glDeleteRenderbuffers().
void zmol::renderbuffer::bind | ( | ) |
Binds the renderbuffer to the OpenGL context.
|
inline |
Returns the target of the renderbuffer.
void zmol::renderbuffer::unbind | ( | ) |
Unbinds the renderbuffer to the OpenGL context.