-
Notifications
You must be signed in to change notification settings - Fork 0
/
opengl_ults.h
22 lines (21 loc) · 1.02 KB
/
opengl_ults.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "glad/include/glad/glad.h"
#include <GLFW/glfw3.h>
#include <string>
class Opengl_ults{
public: bool init();
void setupWindows(int major, int minor);
GLFWwindow* createWindows(int height, int weight, const char* windowTitle);
void processInput(GLFWwindow *window, int key);
void closeWindow(GLFWwindow *window);
bool createShader();
int createVertexShader();
int createFragmentShader(const char *fragmentShaderSource);
int linkShaders(int vertexShader, int fragementShader);
bool setupVertices(int programShader);
int linkingAttributes(float vertics[], int verticesSize);
void drawTriangle(int programShader, int VAO);
void drawSquare(int programShader, int VAO);
int linkElementBuffer(int indices[], int indicesSize);
int ElementBuffer(float vertices[], int verticesSize,int indices[], int indicesSize);
static std::string errorMessageDisplay;
};