Level H Engine
OpenGLRendering.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include "GL/glew.h"
5 #include "../Maths/Vec3.h"
6 #include "../Maths/Vec2.h"
7 
11 namespace OpenGLRendering
12 {
18  void generateVertexArrays(GLsizei numOfArrays, GLuint* VAO);
19 
24  void activateShaderProgram(std::string shaderID);
25 
30  void activateMeshVAO(std::string meshID);
31 
38  void activateMat4Uniform(std::string shaderID, std::string uniformID, float* matPointer);
39 
46  void activateVec3Uniform(std::string shaderID, std::string uniformID, Vec3 vec);
47 
54  void activateVec2Uniform(std::string shaderID, std::string uniformID, Vec2 vec);
55 
59  void unbindVAO();
60 
64  void disableShaderProgram();
65 
71  void bindTextures(std::string meshID, std::string shaderID);
72 
77  void bindVertexArray(GLuint VAO);
78 
83  void drawWithVerticies(std::string meshID);
84 
89  void drawWithPoints(std::string meshID);
90 
95  void drawWithLines(std::string meshID);
96 
101  void drawWithIndices(std::string meshID);
102 }
void unbindVAO()
Unbond a vertex array object.
Definition: OpenGLRendering.cpp:36
void activateVec2Uniform(std::string shaderID, std::string uniformID, Vec2 vec)
Activate a Vec 2 uniform.
Definition: OpenGLRendering.cpp:30
Contains the Vec2 structure with functions and overloaded operators.
Definition: Vec2.h:8
void bindTextures(std::string meshID, std::string shaderID)
A function to bind textures.
Definition: OpenGLRendering.cpp:46
void drawWithLines(std::string meshID)
A function to draw a mesh with lines.
Definition: OpenGLRendering.cpp:65
void disableShaderProgram()
Disable a shader program.
Definition: OpenGLRendering.cpp:41
void drawWithVerticies(std::string meshID)
A function to draw a mesh with verticies.
Definition: OpenGLRendering.cpp:53
void activateVec3Uniform(std::string shaderID, std::string uniformID, Vec3 vec)
Activate a Vec 3 uniform.
Definition: OpenGLRendering.cpp:25
Contains the Vec3 structure with functions and overloaded operators.
Definition: Vec3.h:8
void generateVertexArrays(GLsizei numOfArrays, GLuint *VAO)
A function to generate vertex arrays.
Definition: OpenGLRendering.cpp:5
void activateMeshVAO(std::string meshID)
A function to activate a mesh vertex array object.
Definition: OpenGLRendering.cpp:15
void activateMat4Uniform(std::string shaderID, std::string uniformID, float *matPointer)
Activate a matrix 4 uniform.
Definition: OpenGLRendering.cpp:20
void drawWithPoints(std::string meshID)
A function to draw a mesh with points.
Definition: OpenGLRendering.cpp:59
void activateShaderProgram(std::string shaderID)
A function to activate a shader program.
Definition: OpenGLRendering.cpp:10
A namespace for handeling the openGLFunctions.
Definition: OpenGLRendering.h:11
void drawWithIndices(std::string meshID)
A function to draw a mesh with indicies.
Definition: OpenGLRendering.cpp:71
void bindVertexArray(GLuint VAO)
A function to bind a vertex array.
Definition: OpenGLRendering.cpp:76