Used to render the scene to a framebuffer and apply post processig shaders to it.
More...
#include <Framebuffer.hpp>
Used to render the scene to a framebuffer and apply post processig shaders to it.
◆ Framebuffer() [1/2]
st::Framebuffer::Framebuffer |
( |
| ) |
|
|
default |
◆ Framebuffer() [2/2]
st::Framebuffer::Framebuffer |
( |
std::shared_ptr< ShaderProgram > |
shader | ) |
|
Creates a Framebuffer.
Creation of the GL_FRAMEBUFFER, texture, z-buffer and the screen quad.
- Parameters
-
post | processing shader that will be used to render the framebuffer. |
- check for an error during the load process */
◆ render()
void st::Framebuffer::render |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Renders the framebuffer in the specified screen dymensions.
The framebuffer needs to be set before calling to render. To be called after rendering all other scene elements.
- Parameters
-
width | screen width. |
height | screen height. |
◆ setFramebuffer()
void st::Framebuffer::setFramebuffer |
( |
| ) |
|
Inits the glViewport and the GL_FRAMEBUFFER for the scene objects to be rendered.
To be called at the start of the scene rendering.
◆ depthbuffer_id
GLuint st::Framebuffer::depthbuffer_id |
|
private |
◆ framebuffer_height
const GLsizei st::Framebuffer::framebuffer_height = 2048 |
|
staticprivate |
◆ framebuffer_id
GLuint st::Framebuffer::framebuffer_id |
|
private |
◆ framebuffer_width
const GLsizei st::Framebuffer::framebuffer_width = 2048 |
|
staticprivate |
The resolution in wich the scene is going to be rendered in the framebuffer.
◆ out_texture_id
GLuint st::Framebuffer::out_texture_id |
|
private |
◆ shader
◆ triangle_vbo0
GLuint st::Framebuffer::triangle_vbo0 |
|
private |
◆ triangle_vbo1
GLuint st::Framebuffer::triangle_vbo1 |
|
private |
The documentation for this class was generated from the following files: