40 #ifndef H_GEOGRAM_GFX_BASIC_FBO_H
41 #define H_GEOGRAM_GFX_BASIC_FBO_H
80 bool with_depth_buffer,
81 GLint internal_storage,
135 return (frame_buffer_id != 0);
An OpenGL frame buffer object.
void bind_as_framebuffer()
Binds this framebuffer as the output of OpenGL rendering.
~FrameBufferObject()
FrameBufferObject destructor.
GLuint depth_buffer_id
The id of the texture used for the depth buffer.
GLuint previous_frame_buffer_id
The default frame buffer object associated with the Opengl context.
GLuint frame_buffer_id
The id of the frame buffer.
FrameBufferObject()
FrameBufferObject constructor.
index_t width
The width of this frame buffer, in pixels.
GLuint offscreen_id
The id of the texture used for the color buffer.
GLint internal_storage
The OpenGL internal storage for the color buffer.
void bind_depth_buffer_as_texture()
Binds the depth buffer of this frame buffer as the input 2D texture.
void resize(index_t new_width, index_t new_height)
Resizes the FrameBuferObject.
void unbind()
Unbind this framebuffer.
void bind_as_texture()
Binds this frame buffer as the input 2D texture.
bool initialized()
Tests whether this FrameBufferObject is initialized.
index_t height
The height of this frame buffer, in pixels.
bool is_bound_as_framebuffer() const
Tests whether this framebuffer is bound as a framebuffer.
bool initialize(index_t width_in, index_t height_in, bool with_depth_buffer, GLint internal_storage, bool mipmaps=false)
Initializes the FrameBufferObject.
#define GEOGRAM_GFX_API
Linkage declaration for geogram symbols.
Common include file, providing basic definitions. Should be included before anything else by all head...
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.