Tucano
0.1
A library for rapid prototyping with modern OpenGL and GLSL
|
#include <camerabuffer.hpp>
Public Member Functions | |
CameraBuffer (void) | |
Default constructor. More... | |
void | setNumAttachs (int nt) |
Set number of render targets. More... | |
virtual void | initialize (void) |
Initializes the CameraBuffer effects,. More... | |
void | clearBuffer (void) |
Tucano::Framebuffer * | getFbo (void) |
Returns a pointer to the camera coordinates map with single sampling Note that if multisapling is used (num samples > 1) a blit operation is performed, and the single sampled map is returned. More... | |
Tucano::Framebuffer * | getFboMultisample (void) |
Returns a pointer to the multisampled camera coords map. More... | |
void | setNumSamples (int n) |
Set the number of samples for multisampling. More... | |
void | renderBuffer (const Tucano::Camera &camera, int attach=0) |
Renders the buffers, usually useful for visual debugging. More... | |
void | render (Tucano::Mesh &mesh, const Tucano::Camera &camera, int target=0, const Eigen::Vector4f &buffer_viewport=Eigen::Vector4f(0, 0, 0, 0)) |
Creates the camera coordinates buffer. More... | |
Public Member Functions inherited from Tucano::Effect | |
Effect (string shadersDir="shaders/") | |
Default constructor. More... | |
virtual Shader * | loadShader (string shader_name) |
Loads a shader by filename, initializes it, and inserts in shaders list. More... | |
virtual void | loadShader (Shader &shader, string shader_name) |
virtual Shader * | loadShader (string shader_name, string vertex_name, string frag_name, string geom_name) |
Loads a shader by complete filenames (with extensions), initializes it, and inserts in shaders list. More... | |
void | setShadersDir (string dir) |
virtual void | reloadShaders (void) |
Reloads all shaders needed for effect usage. More... | |
Protected Attributes | |
Tucano::Framebuffer | fbo |
Framebuffer to store the camera coordiantes map, this is using multisampling. More... | |
Tucano::Framebuffer | aa_fbo |
A auxiliary fbo to blit multisampled fbo, this is without multisampling. More... | |
Tucano::Shader | camerabuffer_shader |
Creates the camera buffer by rendering from given camera. More... | |
Tucano::Shader | drawbuffer_shader |
Shader to render the camera coordinates buffer. More... | |
Tucano::Mesh | quad |
Quad for rendering buffer, mostly for debug. More... | |
int | num_samples = 1 |
Number of multisamples, if 1, no multisamping. More... | |
int | num_attachs = 1 |
Numer of render targets. More... | |
Protected Attributes inherited from Tucano::Effect | |
std::vector< Shader * > | shaders_list |
Vector of pointers to shaders used in this effect, in case the user needs multiple pass rendering. More... | |
string | shaders_dir |
Directory in which the shader files are stored. More... | |
Renders a buffer with camera coordinates The FBO may be set to multiple render targets, so many meshes can be rendered in different targets if necessary without creating more effects or FBOs
|
inline |
Default constructor.
|
inline |
|
inline |
Returns a pointer to the camera coordinates map with single sampling Note that if multisapling is used (num samples > 1) a blit operation is performed, and the single sampled map is returned.
|
inline |
Returns a pointer to the multisampled camera coords map.
|
inlinevirtual |
Initializes the CameraBuffer effects,.
Implements Tucano::Effect.
|
inline |
Creates the camera coordinates buffer.
mesh | Mesh to be rendered. |
camera | A pointer to the camera object. |
|
inline |
Renders the buffers, usually useful for visual debugging.
camera | The camera to render from |
|
inline |
Set number of render targets.
nt | Number of rendertargets for FBO |
|
inline |
Set the number of samples for multisampling.
n | Given number of samples |
|
protected |
A auxiliary fbo to blit multisampled fbo, this is without multisampling.
|
protected |
Creates the camera buffer by rendering from given camera.
|
protected |
Shader to render the camera coordinates buffer.
|
protected |
Framebuffer to store the camera coordiantes map, this is using multisampling.
|
protected |
Numer of render targets.
|
protected |
Number of multisamples, if 1, no multisamping.
|
protected |
Quad for rendering buffer, mostly for debug.