mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-04 16:43:15 +02:00
22 lines
1.3 KiB
C++
22 lines
1.3 KiB
C++
#ifndef DRAW_HPP
|
|
#define DRAW_HPP
|
|
#include <glad/glad.h>
|
|
#include <GLFW/glfw3.h>
|
|
#include <string>
|
|
|
|
struct offsetsStruct {
|
|
offsetsStruct(): xOffset(0), yOffset(0), zOffset(0) { }
|
|
float xOffset, yOffset, zOffset;
|
|
};
|
|
|
|
int drawFigure(const int whatToDraw);
|
|
int drawSquare(const char* vertexShaderSource, const char* fragmentShaderSource);
|
|
int drawSquareClass(const char* vertexPath, const char* fragmentPath);
|
|
void doDrawElements(const unsigned int shaderProgram, const unsigned int vertexArrayObject, const GLenum drawArrayMode, const GLenum drawType, const int numberOfElementsToDraw);
|
|
int drawTriangle(const float triangleVertices[], const size_t triangleVerticesSize, const char* vertexShaderSource, const char* fragmentShaderSource, const bool colorIncluded);
|
|
int drawTriangleClass(const float triangleVertices[], const size_t triangleVerticesSize, const char* vertexPath, const char* fragmentPath, const bool colorIncluded = false, const offsetsStruct offsets = offsetsStruct());
|
|
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 );
|
|
unsigned int drawSquareShaderProgram(const char* vertexShaderSource, const char* fragmentShaderSource);
|
|
|
|
#endif |