2022-09-05 20:17:25 +02:00
|
|
|
#ifndef DRAW_HPP
|
|
|
|
|
#define DRAW_HPP
|
|
|
|
|
#include <glad/glad.h>
|
|
|
|
|
#include <GLFW/glfw3.h>
|
2022-11-20 23:14:59 +01:00
|
|
|
#include <string>
|
2022-09-05 20:17:25 +02:00
|
|
|
|
2023-01-27 21:29:04 +01:00
|
|
|
struct offsetsStruct {
|
|
|
|
|
offsetsStruct(): xOffset(0), yOffset(0), zOffset(0) { }
|
|
|
|
|
float xOffset, yOffset, zOffset;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-10 13:40:58 +02:00
|
|
|
int drawFigure(const int whatToDraw);
|
2022-10-19 15:51:39 +02:00
|
|
|
int drawSquare(const char* vertexShaderSource, const char* fragmentShaderSource);
|
2023-01-18 17:51:24 +01:00
|
|
|
int drawSquareClass(const char* vertexPath, const char* fragmentPath);
|
2022-09-05 20:17:25 +02:00
|
|
|
void doDrawElements(const unsigned int shaderProgram, const unsigned int vertexArrayObject, const GLenum drawArrayMode, const GLenum drawType, const int numberOfElementsToDraw);
|
2023-03-05 20:02:41 +01:00
|
|
|
int drawTriangleClass(const float triangleVertices[], const size_t triangleVerticesSize, const char* vertexPath, const char* fragmentPath, const bool colorIncluded = false, const bool textureIncluded = false, const offsetsStruct offsets = offsetsStruct());
|
|
|
|
|
int drawTriangle(const float triangleVertices[], const size_t triangleVerticesSize, const char* vertexShaderSource, const char* fragmentShaderSource, const bool colorIncluded = false, const bool textureIncluded = false);
|
|
|
|
|
int drawTexture();
|
2022-10-19 15:51:39 +02:00
|
|
|
void updateUniformColor(const unsigned int shaderProgram, const GLchar* uniformName);
|
|
|
|
|
void doDrawArrays(const unsigned int shaderProgram, const unsigned int vertexArrayObject, const GLenum drawArrayMode, const int firstIndex, const unsigned int numberOfIndicesToBeRendered );
|
2022-11-20 23:14:59 +01:00
|
|
|
unsigned int drawSquareShaderProgram(const char* vertexShaderSource, const char* fragmentShaderSource);
|
2022-09-05 20:17:25 +02:00
|
|
|
|
2022-10-19 15:51:07 +02:00
|
|
|
#endif
|