Managed to get compiling under ubuntu
This commit is contained in:
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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[]);
|
Reference in New Issue
Block a user