Tucano  0.1
A library for rapid prototyping with modern OpenGL and GLSL
Tucano::Effects::RenderTexture Class Reference

A simple effect to render a texture. More...

#include <rendertexture.hpp>

Inheritance diagram for Tucano::Effects::RenderTexture:
Tucano::Effect

Public Member Functions

 RenderTexture (void)
 Default Constructor. More...
 
virtual void initialize ()
 Initializes the effect, creating and loading the shader. More...
 
void renderTexture (Tucano::Texture &tex, Eigen::Vector2i viewport)
 Renders the given texture. More...
 
- Public Member Functions inherited from Tucano::Effect
 Effect (string shadersDir="shaders/")
 Default constructor. More...
 
virtual ShaderloadShader (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 ShaderloadShader (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...
 

Private Attributes

Tucano::Shader shader
 The mean filter shader. More...
 
Tucano::Mesh quad
 A quad to be rendered forcing one call of the fragment shader per image pixel (its just a proxy geometry) More...
 

Additional Inherited Members

- 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...
 

Detailed Description

A simple effect to render a texture.

Constructor & Destructor Documentation

Tucano::Effects::RenderTexture::RenderTexture ( void  )
inline

Default Constructor.

Member Function Documentation

virtual void Tucano::Effects::RenderTexture::initialize ( void  )
inlinevirtual

Initializes the effect, creating and loading the shader.

Implements Tucano::Effect.

void Tucano::Effects::RenderTexture::renderTexture ( Tucano::Texture tex,
Eigen::Vector2i  viewport 
)
inline

Renders the given texture.

Renders the given texture using a proxy geometry, a quad the size of the viewport to hold the texture.

Member Data Documentation

Tucano::Mesh Tucano::Effects::RenderTexture::quad
private

A quad to be rendered forcing one call of the fragment shader per image pixel (its just a proxy geometry)

Tucano::Shader Tucano::Effects::RenderTexture::shader
private

The mean filter shader.


The documentation for this class was generated from the following file: