aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2025-12-26 15:46:19 +0100
committervimene <vincent.menegaux@gmail.com>2025-12-26 15:46:19 +0100
commitc0eeccb889c8ae969bbb6e44e87bc309ea5f146f (patch)
tree4b7d33acfd3711c4189ebbc9e3e4938f032f657f /src
parentb21d32a0dd906404b0cdf7d6edf395ba63adba8b (diff)
downloadengine-c0eeccb889c8ae969bbb6e44e87bc309ea5f146f.tar.gz
added STBI library
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am13
-rw-r--r--src/engine.cpp2
-rw-r--r--src/stb_image.c2
3 files changed, 7 insertions, 10 deletions
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 <GLFW/glfw3.h>
#include <vulkan/vk_enum_string_helper.h>
+#include <stb_image.h>
+
#ifdef HAVE_NCURSES
#include <ncurses.h>
#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 <stb_image.h>