Managed to get compiling under ubuntu

This commit is contained in:
Dominic
2021-08-14 13:38:57 -07:00
parent 2d977e041c
commit 5cf7da5ee0
7 changed files with 39 additions and 22 deletions

View File

@ -6,7 +6,9 @@
#pragma once
// I load GLAD and GLFW Here because they need to be included in specific orders
#include <glad/glad.h>
#if SETTING_USE_GLAD == 1
#include <glad/glad.h>
#endif
#include <GLFW/glfw3.h>
#include <dawn/dawn.h>
#include "../../src/display/render.h"

View File

@ -9,7 +9,7 @@
game_t *GAME_STATE;
int main(int argc, char *argv[]) {
int32_t main(int32_t argc, char *argv[]) {
game_t *game;
input_t *input;
SDL_GLContext context;
@ -57,11 +57,13 @@ int main(int argc, char *argv[]) {
return 1;
}
// Load glad
if (!gladLoadGLLoader((GLADloadproc) SDL_GL_GetProcAddress)) {
printf("Failed to initialize the OpenGL context.\n");
return 1;
}
#if SETTING_USE_GLAD == 1
// Load glad
if (!gladLoadGLLoader((GLADloadproc) SDL_GL_GetProcAddress)) {
printf("Failed to initialize the OpenGL context.\n");
return 1;
}
#endif
// Bind the GL Context
SDL_GL_MakeCurrent(displayWindow, context);

View File

@ -7,10 +7,6 @@
#pragma once
#include <dawn/dawn.h>
#include <glad/glad.h>
#include <SDL.h>
#include <SDL_opengl.h>
#include <SDL_opengles2.h>
#include "../../src/display/render.h"
#include "../../src/game/game.h"
#include "../../src/input/input.h"
@ -21,4 +17,4 @@
#define OPENGL_MAJOR_VERSION 2
#define OPENGL_MINOR_VERSION 1
int main(int argc, char *argv[]);
int32_t main(int32_t argc, char *argv[]);