Shader Tool
Small shader visualiser.
|
Customized GLCanvas class to act as a customizable framebuffer. More...
#include <Canvas.hpp>
Public Member Functions | |
Canvas (Widget *parent) | |
Creates the canvas framebuffer. More... | |
~Canvas () | |
virtual void | drawGL () override |
Draws the framebuffer. More... | |
void | setShader (shared_ptr< st::Shader > shader) |
Relaces the shader used to render the framebuffer. More... | |
nanogui::Vector2i | loadTexture (string path) |
Loads a texture and binds it to the shader. More... | |
Private Attributes | |
nanogui::GLShader | mShader |
GLuint | framebuffer_id |
GLuint | depthbuffer_id |
GLuint | out_texture_id |
GLuint | triangle_vbo0 |
GLuint | triangle_vbo1 |
Static Private Attributes | |
static const GLsizei | framebuffer_width = 2048 |
The resolution in wich the scene is going to be rendered in the framebuffer. More... | |
static const GLsizei | framebuffer_height = 2048 |
Customized GLCanvas class to act as a customizable framebuffer.
st::Canvas::Canvas | ( | Widget * | parent | ) |
Creates the canvas framebuffer.
|
inline |
|
overridevirtual |
Draws the framebuffer.
nanogui::Vector2i st::Canvas::loadTexture | ( | string | path | ) |
Loads a texture and binds it to the shader.
path | Path to the texture. |
void st::Canvas::setShader | ( | shared_ptr< st::Shader > | shader | ) |
Relaces the shader used to render the framebuffer.
shader | Replacement shader. |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
The resolution in wich the scene is going to be rendered in the framebuffer.
|
private |
|
private |
|
private |
|
private |