24 #include <GLES3/gl3.h>
25 #include <GLES3/gl3ext.h>
105 void setColor(
float red,
float green,
float blue,
float alpha);
113 void setupGraphics(
const std::string vertexShaderPath,
const std::string fragmentShaderPath);
127 virtual void draw(
float* rotationVector) = 0;
static const unsigned int vertexComponentsCount
Number of coordinates for one vertex.
virtual ~Torus(void)
Frees allocated memory.
float projectionMatrix[16]
void setProjectionMatrix(MaliSDK::Matrix *projectionMatrix)
Pass the correctly defined projection matrix to the program related to the torus model.
Functions for manipulating matrices.
GLuint programID
ID of a program linked to the torus model.
static const unsigned int pointsPerCircleCount
Number of points in one circle.
Torus(void)
Protected constructor used to do intialization general to all torus objects.
float torusRadius
Distance between the center of torus and the center of its tube.
virtual bool initializeVertexAttribs()=0
Initialize vertex attribute arrays and buffer objects coresponding to them. Make sure that programID ...
void setColor(float red, float green, float blue, float alpha)
Sets the uniform color of the drawn torus.
static void setResourceDirectory(std::string requiredResourceDirectory)
Set the resource directory for all tori.
static const unsigned int circlesCount
Number of circles in torus model.
float circleRadius
Radius of circles that model the tube.
Abstract class that draws torus on the screen. It stores generic data describing the drawn torus: ...
GLuint vaoID
ID of a vertex array object that stores pointers to vertex data sources used to rasterize given mesh...
virtual void draw(float *rotationVector)=0
Draw the torus model.
static const unsigned int torusVerticesCount
Total number of vertices in torus model.
void setupGraphics(const std::string vertexShaderPath, const std::string fragmentShaderPath)
Initialize constant OpenGL components such as program, shaders and constant matrices.
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count
static const unsigned int componentsCount
Total number of components in torus model, needed to determine the size of vertex arrays...
static std::string resourceDirectory