-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKL2_Manager.cpp
More file actions
29 lines (21 loc) · 981 Bytes
/
Copy pathKL2_Manager.cpp
File metadata and controls
29 lines (21 loc) · 981 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
#include"KL2_Manager.hpp"
#include"stb_image/stb_image.h"
#include"GLFW/glfw3.h"
#include<iostream>
unsigned KL2::Manager::OpenGL_VersionMajor = 0;
unsigned KL2::Manager::OpenGL_VersionMinor = 0;
size_t KL2::Manager::CKL2::_GetVoidPtrSizeInKL2() noexcept { return sizeof(void*); }
void KL2::Manager::CKL2::_InitializeKL2(unsigned openglVersionMajor, unsigned openglVersionMinor) {
OpenGL_VersionMajor = openglVersionMajor;
OpenGL_VersionMinor = openglVersionMinor;
if (!glfwInit()) {
ErrorsSystem::SendError << "Failed to initialize GLFW" >> SErrorsEnumWrapper(ErrorsEnum::FailedToInitializeGLFW);
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, openglVersionMajor);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, openglVersionMinor);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);
}
void KL2::Manager::CKL2::_UninitializeKL2() {
glfwTerminate();
}