|
Deep Learning Visualizer
Interactive visualization of basic applications of deep learning
|
OpenGL renderer that uses batch rendering. More...
#include <renderer.h>
Public Member Functions | |
| renderer () | |
| Constructs the renderer; reserves memory in the vertices vector. | |
| ~renderer () | |
| Destructor that cleans up the VAO and VBO. | |
| renderer (const renderer &)=delete | |
| renderer & | operator= (const renderer &)=delete |
| renderer (renderer &&)=delete | |
| renderer & | operator= (renderer &&)=delete |
| void | begin_frame () |
| Begins a frame by clearing the vertices buffer. | |
| void | end_frame () |
| Ends a frame by clearing what is currently drawn and drawing the vertices. | |
| void | set_color (const Eigen::Vector3f &color) |
| Sets the current color used when buffering shapes to be drawn. | |
| void | draw_triangle (const Eigen::Vector2f &p1, const Eigen::Vector2f &p2, const Eigen::Vector2f &p3) |
| Buffers a triangle to be drawn when the frame ends. | |
| void | draw_quad (const Eigen::Vector2f &p1, const Eigen::Vector2f &p2, const Eigen::Vector2f &p3, const Eigen::Vector2f &p4) |
| Buffers a quad to be drawn when the frame ends. | |
| void | draw_line (const Eigen::Vector2f &p1, const Eigen::Vector2f &p2, float thickness) |
| Buffers a line to be drawn when the frame ends. | |
| void | draw_text (const Eigen::Vector2f &position, const std::string &text) |
| Buffers text to be drawn when the frame ends. | |
OpenGL renderer that uses batch rendering.
| void engine::graphics::renderer::begin_frame | ( | ) |
Begins a frame by clearing the vertices buffer.
Should be called before submitting shapes to the renderer.
| void engine::graphics::renderer::draw_line | ( | const Eigen::Vector2f & | p1, |
| const Eigen::Vector2f & | p2, | ||
| float | thickness | ||
| ) |
Buffers a line to be drawn when the frame ends.
| p1 | The first point of the line. |
| p2 | The second point of the line. |
| thickness | The thickness of the line. |
| void engine::graphics::renderer::draw_quad | ( | const Eigen::Vector2f & | p1, |
| const Eigen::Vector2f & | p2, | ||
| const Eigen::Vector2f & | p3, | ||
| const Eigen::Vector2f & | p4 | ||
| ) |
Buffers a quad to be drawn when the frame ends.
| p1 | The first point of the quad. |
| p2 | The second point of the quad. |
| p3 | The third point of the quad. |
| p4 | The fourth point of the quad. |
| void engine::graphics::renderer::draw_text | ( | const Eigen::Vector2f & | position, |
| const std::string & | text | ||
| ) |
Buffers text to be drawn when the frame ends.
TODO: function is not implemented yet
| void engine::graphics::renderer::draw_triangle | ( | const Eigen::Vector2f & | p1, |
| const Eigen::Vector2f & | p2, | ||
| const Eigen::Vector2f & | p3 | ||
| ) |
Buffers a triangle to be drawn when the frame ends.
| p1 | The first point of the triangle. |
| p2 | The second point of the triangle. |
| p3 | The third point of the triangle. |
|
inline |
Sets the current color used when buffering shapes to be drawn.
| color | A RGB color vector. |