Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
GLPlatform.cpp
Go to the documentation of this file.
1#include "pch.h"
3#include <glad/glad.h>
4#include <GLFW/glfw3.h>
5
6
8{
9 Logger::Log("OpenGL Backend init started");
10 if(!gladLoadGL()){
11 Logger::Fatal("Failed to load GLAD");
13 }
14 Logger::Log("GLAD loaded successfully");
15 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
16 glfwInitHint(GLFW_VERSION_MAJOR, 4);
17 glfwInitHint(GLFW_VERSION_MINOR, 6);
18
19 if(glfwInit() == GLFW_FALSE){
20 Logger::Log("Failed to initalize GLFW");
22 }
23 Logger::Log("GLFW successfully initalized");
24 Logger::Log("OpenGL Backend initalized.");
25 return ErrorCode::OK;
26}
static void Log(const char *message)
Definition Logger.h:104
static void Fatal(fmt::format_string< Args... > message, Args &&... args)
Definition Logger.h:147
ErrorCode
Definition Error.h:6