|
zMol
A viewer for molecular data using OpenGL and ambient occlusion
|
#include <fbo.hpp>
Inherits zmol::noncopyable_::noncopyable.
Public Member Functions | |
| fbo (GLenum const p_target=GL_FRAMEBUFFER) | |
| ~fbo () | |
| GLuint | get_name () const |
| GLuint | get_target () const |
| void | bind () |
| void | unbind () |
Framebuffer object wrapper class.
The class creates a framebuffer object 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 framebuffer object using glGenFramebuffers().
| p_target | Target. Can be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER (the default). |
| zmol::fbo::~fbo | ( | ) |
Destructor. Destroys the framebuffer object using glDeleteFramebuffers().
| void zmol::fbo::bind | ( | ) |
Binds the framebuffer object to the OpenGL context.
|
inline |
Returns the OpenGL name of the framebuffer object.
|
inline |
Returns the target of the framebuffer object.
| void zmol::fbo::unbind | ( | ) |
Unbinds the framebuffer object to the OpenGL context.
1.8.1.1