From c0eeccb889c8ae969bbb6e44e87bc309ea5f146f Mon Sep 17 00:00:00 2001 From: vimene Date: Fri, 26 Dec 2025 15:46:19 +0100 Subject: added STBI library --- src/Makefile.am | 13 +++---------- src/engine.cpp | 2 ++ src/stb_image.c | 2 ++ 3 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 src/stb_image.c (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index ad18692..88e4ee3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,7 @@ engine_SOURCES = \ renderer.hpp renderer.cpp \ obj_parser.hpp obj_parser.cpp \ vulkan_utils.hpp \ + stb_image.c \ fb/chfb.hpp fb/chfb.cpp fb/pixfb.hpp fb/pixfb.cpp \ math/vector.hpp \ math/mat4.hpp \ @@ -25,17 +26,9 @@ engine_SOURCES = \ o3d/scene.hpp \ ctrl/keyboard.hpp \ ctrl/mouse.hpp -engine_CPPFLAGS = -std=gnu++23 -Wall -Wextra +engine_CPPFLAGS = -std=gnu++23 -Wall -Wextra -DDATADIR='"$(datadir)"' -DSHADERSDIR='"$(shadersdir)"' $(GLFW3_CFLAGS) $(STB_CFLAGS) $(VULKAN_CFLAGS) engine_LDFLAGS = -std=gnu++23 -Wall -Wextra - -engine_CPPFLAGS += -DDATADIR='"$(datadir)"' -DSHADERSDIR='"$(shadersdir)"' - -# Not sure why they are needed -engine_LDADD =# -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi -engine_CPPFLAGS += $(GLFW3_CFLAGS) -engine_LDADD += $(GLFW3_LIBS) -engine_CPPFLAGS += $(VULKAN_CFLAGS) -engine_LDADD += $(VULKAN_LIBS) +engine_LDADD = $(GLFW3_LIBS) $(STB_LIBS) $(VULKAN_LIBS) if HAVE_NCURSES engine_CPPFLAGS += $(NCURSES_CFLAGS) diff --git a/src/engine.cpp b/src/engine.cpp index 792b99f..4ab8c60 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -26,6 +26,8 @@ #include #include +#include + #ifdef HAVE_NCURSES #include #endif diff --git a/src/stb_image.c b/src/stb_image.c new file mode 100644 index 0000000..9177288 --- /dev/null +++ b/src/stb_image.c @@ -0,0 +1,2 @@ +#define STB_IMAGE_IMPLEMENTATION +#include -- cgit v1.2.3