1#ifndef GLSHAPERENDERER_H
2#define GLSHAPERENDERER_H
27 xytheta = std::vector<float>(sizeHint*xythetaDim+padShapes*xythetaDim,0.0f);
28 scale = std::vector<float>(sizeHint*scaleDim+padShapes*scaleDim,0.0f);
29 colours = std::vector<float>(sizeHint*coloursDim+padShapes*coloursDim,0.0f);
62 std::shared_ptr<Shader>
shader,
63 std::vector<std::pair<Info, Shape>> & shapes,
67 GLuint vao, a_position, a_xytheta, a_scale, a_colour;
72 0.5f, 0.5f, 1.0f, 1.0f,
73 0.5f, -0.5f, 1.0f, 0.0f,
74 -0.5f, -0.5f, 0.0f, 0.0f,
75 -0.5f, 0.5f, 0.0f, 1.0f,
76 -0.5f, -0.5f, 0.0f, 0.0f,
77 0.5f, 0.5f, 1.0f, 1.0f
80 std::vector<float> xytheta;
81 size_t xythetaDim = 3;
82 size_t xythetaAttribtue = 1;
84 std::vector<float> scale;
86 size_t scaleAttribtue = 2;
88 std::vector<float> colours;
89 size_t coloursDim = 4;
90 size_t coloursAttribtue = 3;
OpenGL implementation of ShapeRenderer.
Definition glShapeRenderer.h:15
static const char * rectangleFragmentShader
A fragment shader to draw rectangles.
Definition glShapeRenderer.h:50
static const char * shapeVertexShader
A vertex shader for any default shapes.
Definition glShapeRenderer.h:44
~glShapeRenderer()
Definition glShapeRenderer.h:35
static const char * ellipseFragmentShader
A fragment shader to draw ellipses.
Definition glShapeRenderer.h:56
glShapeRenderer(size_t sizeHint=8)
Construct a new glShapeRenderer.
Definition glShapeRenderer.h:24
Renders shapes with optional rendering priority.
Definition shapeRenderer.h:31
std::shared_ptr< Shader > shader
Definition shapeRenderer.h:151
Control updated data for drawing.
Definition shapeRenderer.h:40