![]() |
Vis 2 Demo
1.0
Technical illustration type real-time rendering of geometry
|
This class produces quads for post-processing purposes. More...
Public Member Functions | |
QuadTextured (glm::mat4 _modelMatrix, ShaderController *_shader_ctrl, bool _b_fill_window) | |
Constructor. More... | |
virtual | ~QuadTextured () |
Destructor. More... | |
virtual void | update (double _deltaT) |
Empty update function. More... | |
virtual void | draw (glm::mat4 &_projectionMatrix) |
The standard drawing function. More... | |
void | draw (glm::mat4 &_projectionMatrix, glm::vec3 _edge_color) |
A drawing function for drawing with particular edge color when using edge detecting shaders. More... | |
![]() | |
DrawableObject (glm::mat4 &_modelMatrix) | |
Constructor. More... | |
virtual | ~DrawableObject () |
Destructor. More... | |
Private Member Functions | |
QuadTextured (const QuadTextured &) | |
Hidden copy-constructor. More... | |
Private Attributes | |
ShaderController * | shader_ctrl |
handle to the shader program used by this quad More... | |
bool | b_fill_window |
if true the quad fills the window, if false the quad fills the upper left quarter of the window More... | |
GLuint | vao_handle |
handle to the vertex array object for the shader program More... | |
bool | vao_setup_done |
signifies if the setup for the shader completed More... | |
GLuint | position_buffer_handle |
handle to the vertex buffer object containing the vertex coordinates in object space More... | |
GLuint | normal_buffer_handle |
handle to the normal buffer object containing the vertex normals in object space More... | |
GLuint | uv_buffer_handle |
handle to the uv buffer object containing the vertex texture coordinates in object space More... | |
GLuint | index_buffer_handle |
handle to the vertex buffer object containing the face indices for each polygon More... | |
Static Private Attributes | |
static const float | generic_positions [QUAD_TEXTURED_VERTEX_COUNT *3] |
the vertex positions for a generic quad with pivot in (0,0) More... | |
static const float | generic_positions_full [QUAD_TEXTURED_VERTEX_COUNT *3] |
the vertex positions for a generic screen-filling quad with pivot in (0,0) More... | |
static const float | generic_normlas [QUAD_TEXTURED_VERTEX_COUNT *3] |
the vertex normals for the generic quad More... | |
static const float | generic_uv [QUAD_TEXTURED_VERTEX_COUNT *2] |
the vertex uv coordinates for the generic quad More... | |
static const unsigned int | generic_indices [QUAD_TEXTURED_INDEX_COUNT] |
the face indices for the generic quad More... | |
Additional Inherited Members | |
![]() | |
glm::mat4 | modelMatrix |
holds the current model matrix More... | |
This class produces quads for post-processing purposes.
Definition at line 15 of file QuadTextured.h.
QuadTextured::QuadTextured | ( | glm::mat4 | _modelMatrix, |
ShaderController * | _shader_ctrl, | ||
bool | _b_fill_window | ||
) |
Constructor.
The geometry definition is contained in this class.
[in] | _modelMatrix | is the object model matrix, |
[in] | _shader_ctrl | is the shader controller for passing information btw geometry and environment, |
[in] | _b_fill_window | is true, if the quad should be rendered over the entire window, false - if it should occupy the upper left quarter for debugging output. |
Definition at line 5 of file QuadTextured.cpp.
|
virtual |
Destructor.
Deletes the VBOs and the VAO built in the constructor.
Definition at line 55 of file QuadTextured.cpp.
|
private |
Hidden copy-constructor.
|
virtual |
The standard drawing function.
Calls draw(glm::mat4 & _projectionMatrix, glm::vec3 _edge_color).
[in] | _projectionMatrix | passes the combined view and projectino matrices. |
Implements vis2::DrawableObject.
Definition at line 71 of file QuadTextured.cpp.
void QuadTextured::draw | ( | glm::mat4 & | _projectionMatrix, |
glm::vec3 | _edge_color | ||
) |
A drawing function for drawing with particular edge color when using edge detecting shaders.
This function activates the shader program, passes the updates to the shader uniform variables,
binds the Vertex Attribute Object (VAO), makes a draw call, then unbinds both the VAO and the shader program.
[in] | _projectionMatrix | is the camera projection matrix, |
[in] | _edge_color | is the edge color to be used. |
Definition at line 76 of file QuadTextured.cpp.
|
virtual |
Empty update function.
Implements vis2::DrawableObject.
Definition at line 67 of file QuadTextured.cpp.
|
private |
if true the quad fills the window, if false the quad fills the upper left quarter of the window
Definition at line 50 of file QuadTextured.h.
|
staticprivate |
the face indices for the generic quad
Definition at line 64 of file QuadTextured.h.
|
staticprivate |
the vertex normals for the generic quad
Definition at line 62 of file QuadTextured.h.
|
staticprivate |
the vertex positions for a generic quad with pivot in (0,0)
Definition at line 60 of file QuadTextured.h.
|
staticprivate |
the vertex positions for a generic screen-filling quad with pivot in (0,0)
Definition at line 61 of file QuadTextured.h.
|
staticprivate |
the vertex uv coordinates for the generic quad
Definition at line 63 of file QuadTextured.h.
|
private |
handle to the vertex buffer object containing the face indices for each polygon
Definition at line 58 of file QuadTextured.h.
|
private |
handle to the normal buffer object containing the vertex normals in object space
Definition at line 56 of file QuadTextured.h.
|
private |
handle to the vertex buffer object containing the vertex coordinates in object space
Definition at line 55 of file QuadTextured.h.
|
private |
handle to the shader program used by this quad
Definition at line 49 of file QuadTextured.h.
|
private |
handle to the uv buffer object containing the vertex texture coordinates in object space
Definition at line 57 of file QuadTextured.h.
|
private |
handle to the vertex array object for the shader program
Definition at line 52 of file QuadTextured.h.
|
private |
signifies if the setup for the shader completed
Definition at line 53 of file QuadTextured.h.