76 glViewport(0, 0, viewport[0], viewport[1]);
void createQuad(void)
Sets the mesh as Unit Quad.
Definition: mesh.hpp:841
Tucano::Shader shader
The mean filter shader.
Definition: gradientfilter.hpp:44
Definition: bufferobject.hpp:34
bool vertical
Apply gradient in vertical direction.
Definition: gradientfilter.hpp:53
void bind(int texture_unit)
Binds the texture to a given unit. Note that if there is another texture already binded to this unit...
Definition: texture.hpp:285
A Shader object represents one GLSL program.
Definition: shader.hpp:45
A simple Sobel filter for image processing.
Definition: gradientfilter.hpp:38
bool horizontal
Apply gradient in horizontal direction.
Definition: gradientfilter.hpp:50
void setDirections(bool hgrad, bool vgrad)
Sets flags for computing gradient in horizontal and vertical directions.
Definition: gradientfilter.hpp:93
virtual void initialize()
Initializes the effect, creating and loading the shader.
Definition: gradientfilter.hpp:65
void unbind(void)
Disables the shader program.
Definition: shader.hpp:1184
virtual Shader * loadShader(string shader_name)
Loads a shader by filename, initializes it, and inserts in shaders list.
Definition: effect.hpp:73
virtual void render(void)
Render the mesh triangles. The method binds the buffers, calls the method to render triangles...
Definition: mesh.hpp:756
GradientFilter(void)
Default Constructor.
Definition: gradientfilter.hpp:60
Tucano::Mesh quad
A quad to be rendered forcing one call of the fragment shader per image pixel.
Definition: gradientfilter.hpp:47
An OpenGL texture. It can be a simple texture or an FBO texture.
Definition: texture.hpp:41
void bind(void)
Enables the shader program for usage.
Definition: shader.hpp:1176
A common Mesh, usually containing triagles or points.
Definition: mesh.hpp:194
The Effect class is a holder for Shaders. It is completely optional, but is contains a few methods fo...
Definition: effect.hpp:43
void unbind(void)
Unbinds this texture and frees the texture unit.
Definition: texture.hpp:367
void renderTexture(Tucano::Texture &tex, Eigen::Vector2i viewport)
Applies the gradient filter to an image.
Definition: gradientfilter.hpp:74
void setUniform(GLint location, GLint a, GLint b, GLint c, GLint d)
Sets an uniform integer 4D vector (ivec4) given a location and the vector values. ...
Definition: shader.hpp:1258