Load cglm .so

This commit is contained in:
Joseph Ferano 2023-10-16 18:19:38 +07:00
parent 7383129a51
commit 3f1e47b054
4 changed files with 12 additions and 7 deletions

View File

@ -1,8 +1,8 @@
P=main
OBJECTS=objs/glad.o objs/stb_image_precompiled.o
CFLAGS=-g -Wall -Wextra -O0
LDLIBS=-lglfw -lOpenGL -lm -L objs/libcglm.so
INCLUDES=-Ilibs/glad/include/ -Ilibs/ -Iobjs/
LDLIBS=-lglfw -lOpenGL -lm -lcglm -lcyaml -L objs/
INCLUDES=-Ilibs/glad/include/ -Ilibs/
CC=gcc
RM=rm -vf
@ -16,7 +16,7 @@ texturepacker:
.PHONY: run
run: build
./$(P)
LD_LIBRARY_PATH=objs/ ./$(P)
.PHONY: clean
clean:

View File

@ -8,7 +8,10 @@
* DONE Write images to correct regions in output buffer
* DONE Generate a Rect data structure that determines where an image goes
* DONE Write to the rect rather than global values
* TODO Create a basic GLU loop so we can debug writing the colors
* DONE Precompile stb_image for faster compilation
* TODO Create a basic data structure and read/write to/from yaml
* TODO Figure out the pipeline for sprites, atlases, and animations
* TODO Draw pixels over an SDL loop so we can debug writing the colors
* TODO Research simple texture packing algorithms
* TODO Implement one?
* TODO Take an =-o= flag for the name of the output file
@ -17,9 +20,10 @@
* TODO Write unit tests
* TODO Figure out how to profile performance
* Systems
** Serialization
** Sprites
*** Texture Packer
*** Animation
** Texture Packer
** Animation
** Physics
** Particle Systems
** Camera

1
lib.h
View File

@ -5,6 +5,7 @@
typedef uint8_t u8;
// typedef char16_t c16;
typedef uint16_t u16;
typedef int32_t b32;
typedef int32_t i32;
typedef uint32_t u32;

2
main.c
View File

@ -121,7 +121,7 @@ int main(void) {
int width, height, channels;
char* data = (char*)stbi_load("assets/idle.png", &width, &height, &channels, 4);
if (data == NULL) {
fprintf(stderr, "Could not load texture");
fprintf(stderr, "Could not load texture\n");
return -1;
}