|
Marbellous
Marbellous, a WebApp to generate paper marbling patterns.
|
Base class for rendering. More...
#include <WGLRenderer.hpp>


Public Member Functions | |
| void | setupShaderProgram (std::string vert, std::string frag, GLint &shader) |
| Create a shader program. More... | |
| void | constructFBO (size_t x, bool stencil_depth, GLint interpolation, GLuint &fbo, GLuint &tex) |
| Construct a FBO. More... | |
| virtual void | setActive () const =0 |
| All Renderer objects need to be set active to set the needed WGL state. More... | |
| virtual void | resize ()=0 |
| All Renderer objects should be resizeable. More... | |
| void | buildColorBuffer (Palette const &p, std::vector< GLfloat > &v) |
| Build a color buffer from a palette which may be send to GPU. More... | |
Base class for rendering.
Provides some basic function like shader compilation, FBO creation and color packing.
|
inline |
Build a color buffer from a palette which may be send to GPU.
| p | A palette. |
| v | The color buffer to fill. |

| void WGLRenderer::constructFBO | ( | size_t | x, |
| bool | stencil_depth, | ||
| GLint | interpolation, | ||
| GLuint & | fbo, | ||
| GLuint & | tex | ||
| ) |
Construct a FBO.
| x | Pixel resolution for the FBO. | |
| stencil_depth | Wether to generate a stencil/depth buffer. | |
| interpolation | used on texture sampling | |
| [out] | fbo | FBO handle. |
| [out] | tex | Handle for the FBO draw attachement which can be used as texture. |

|
pure virtual |
All Renderer objects should be resizeable.
Implemented in WGLSceneRenderer, WGLRakeRenderer, and WGLFilter.
|
pure virtual |
All Renderer objects need to be set active to set the needed WGL state.
Implemented in WGLSceneRenderer, WGLRakeRenderer, and WGLFilter.
| void WGLRenderer::setupShaderProgram | ( | std::string | vert, |
| std::string | frag, | ||
| GLint & | shader | ||
| ) |
Create a shader program.
This includes error checking and linking of a vertex shader and a fragment shader.
| vert | Vertex shader code. |
| frag | Fragment shader code. |
| shader | Shader program handle. |
