-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmygl.cpp
More file actions
31 lines (23 loc) · 692 Bytes
/
mygl.cpp
File metadata and controls
31 lines (23 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "mygl.h"
#include "guimanager.h"
ivec2 MyGL::screenDimensions = ivec2(0);
MyGL::MyGL() : vaoHandle() {}
MyGL::~MyGL() {
glDeleteVertexArrays(1, &vaoHandle);
}
void MyGL::initializeGL() {
glGenVertexArrays(1, &vaoHandle);
glBindVertexArray(vaoHandle);
shader.createAndCompileShaderProgram("passthrough.vert.glsl", "sdy.main.frag.glsl");
shader.setupObjectUBOs(); //
q.createVBOData();
}
void MyGL::render() {
glClearColor(0.8, 0.4, 0.2, 1.0f); // Set current clear color
glClear(GL_COLOR_BUFFER_BIT); // Clear color buffer with current clear col
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
ImGuizmo::BeginFrame();
shader.draw(q);
}