Remove glad dependency

* Hope nothing broke (tested every example, but you can never be sure)
This commit is contained in:
Captain4LK 2020-07-25 20:37:29 +02:00
parent b1cc55daba
commit ebfdc420a5
7 changed files with 8 additions and 26161 deletions

View File

@ -57,7 +57,6 @@ SoftLK should work on any plattform that has a C compiler, SDL2 and OpenGL 2.1,
Here I shall list all external libraries used by SoftLK:
* [SDL2](https://www.libsdl.org/)
* [glad](https://glad.dav1d.de/)
* [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h)
* [stb_image_write](https://github.com/nothings/stb/blob/master/stb_image_write.h)
* [stb_rect_pack](https://github.com/nothings/stb/blob/master/stb_rect_pack.h)

9382
external/glad.c vendored

File diff suppressed because one or more lines are too long

16768
external/glad.h vendored

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
#define _SLK_TYPES_H_
#include <stdint.h>
#include "../../external/glad.h"
#include <SDL2/SDL_opengl.h>
typedef struct
{

View File

@ -2,12 +2,9 @@ CC = gcc
CFLAGS+=-lm -lSDL2 -lGL -Wall
//CFLAGS+=-lm -lSDL2 -lGL -Wall -pg
libSLK.a: glad.o SLK_core.o SLK_color.o SLK_draw_pal.o SLK_draw_rgb.o SLK_input.o SLK_layer.o SLK_palette.o SLK_render.o SLK_sprite_pal.o SLK_sprite_rgb.o SLK_timer.o SLK_sheet_rgb.o SLK_sheet_pal.o
libSLK.a: SLK_core.o SLK_color.o SLK_draw_pal.o SLK_draw_rgb.o SLK_input.o SLK_layer.o SLK_palette.o SLK_render.o SLK_sprite_pal.o SLK_sprite_rgb.o SLK_timer.o SLK_sheet_rgb.o SLK_sheet_pal.o
ar cr libSLK.a $^
glad.o: ../external/glad.c ../external/glad.h
$(CC) -O3 -c $< $(CFLAGS)
SLK_core.o: ../src/SLK_core.c ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h ../src/SLK_input_i.h ../src/SLK_render_i.h ../src/SLK_draw_rgb_i.h ../src/SLK_draw_pal_i.h ../src/SLK_layer_i.h
$(CC) -O3 -c $< $(CFLAGS)
@ -23,13 +20,13 @@ SLK_draw_rgb.o: ../src/SLK_draw_rgb.c ../include/SLK/SLK_functions.h ../include/
SLK_input.o: ../src/SLK_input.c ../include/SLK/SLK_types.h ../src/SLK_input_i.h ../src/SLK_render_i.h ../src/SLK_layer_i.h
$(CC) -O3 -c $< $(CFLAGS)
SLK_layer.o: ../src/SLK_layer.c ../external/glad.h ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h ../src/SLK_render_i.h ../src/SLK_draw_rgb_i.h ../src/SLK_draw_pal_i.h ../src/SLK_layer_i.h
SLK_layer.o: ../src/SLK_layer.c ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h ../src/SLK_render_i.h ../src/SLK_draw_rgb_i.h ../src/SLK_draw_pal_i.h ../src/SLK_layer_i.h
$(CC) -O3 -c $< $(CFLAGS)
SLK_palette.o: ../src/SLK_palette.c ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h
$(CC) -O3 -c $< $(CFLAGS)
SLK_render.o: ../src/SLK_render.c ../external/glad.h ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h ../src/SLK_render_i.h ../src/SLK_layer_i.h
SLK_render.o: ../src/SLK_render.c ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h ../src/SLK_render_i.h ../src/SLK_layer_i.h
$(CC) -O3 -c $< $(CFLAGS)
SLK_sprite_pal.o: ../src/SLK_sprite_pal.c ../include/SLK/SLK_types.h ../include/SLK/SLK_functions.h

View File

@ -15,7 +15,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//External includes
#include <SDL2/SDL.h>
#include "../external/glad.h"
#include <SDL2/SDL_opengl.h>
#include <GL/gl.h>
//-------------------------------------
//Internal includes

View File

@ -15,7 +15,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//External includes
#include <SDL2/SDL.h>
#include "../external/glad.h"
#include <SDL2/SDL_opengl.h>
#include <GL/gl.h>
//-------------------------------------
//Internal includes
@ -44,7 +45,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
void SLK_i_render_init()
{
printf("OpenGL loaded\n");
gladLoadGLLoader(SDL_GL_GetProcAddress);
printf("Vendor: %s\n",glGetString(GL_VENDOR));
printf("Renderer: %s\n",glGetString(GL_RENDERER));
printf("Version: %s\n",glGetString(GL_VERSION));