fixed includes

This commit is contained in:
2025-09-13 15:34:34 +02:00
parent 530d868364
commit bf2041351e
10 changed files with 2435 additions and 15 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
- name: install libs - name: install libs
run: sudo apt install -y libglfw3-dev libgl-dev run: sudo apt install -y libglfw3-dev libgl-dev
- name: gcc - name: gcc
run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lglfw -lGL -lm -Iinclude -ldl run: mkdir -p build && gcc -v -Wall -Wextra -Werror src/*.c src/*.h -lglfw -lGL -lm -Iinclude
build-release: build-release:
needs: lint needs: lint
+1 -1
View File
@@ -2,5 +2,5 @@ AUTOMAKE_OPTIONS = foreign subdir-objects -Wall
bin_PROGRAMS = forge bin_PROGRAMS = forge
forge_SOURCES = src/main.c src/args.c src/forge.c src/file.c src/window.c src/shaders.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/linmath.h forge_SOURCES = src/main.c src/args.c src/forge.c src/file.c src/window.c src/shaders.c $(top_srcdir)/include/glad/gl.h $(top_srcdir)/include/linmath.h
forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include forge_CFLAGS = -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(top_srcdir)/include
forge_LDADD = -lglfw -lGL -lm -ldl forge_LDADD = -lm -lGL -lglfw
include_HEADERS = src/main.h src/args.h src/config.h src/types.h src/forge.h src/file.h src/constants.h src/window.h src/shaders.h include_HEADERS = src/main.h src/args.h src/config.h src/types.h src/forge.h src/file.h src/constants.h src/window.h src/shaders.h
+6 -1
View File
@@ -9,7 +9,12 @@ clean:
build: build:
@mkdir -p build @mkdir -p build
gcc -Wall -Wextra src/*.h src/*.c -Iinclude -lglfw -lGL -lm -o build/$(TARGET) gcc \
src/*.h src/*.c \
-Iinclude \
-lm -lGL -lglfw \
-Wall -Wextra \
-o build/$(TARGET)
run: build run: build
./build/forge --hot-reload --frag=./shaders/frag.glsl ./build/forge --hot-reload --frag=./shaders/frag.glsl
+1
View File
@@ -7,6 +7,7 @@ AC_CHECK_HEADERS([stdbool.h])
AC_CHECK_HEADERS([stddef.h]) AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([string.h]) AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([time.h]) AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([math.h])
AC_CHECK_HEADERS([sys/stat.h]) AC_CHECK_HEADERS([sys/stat.h])
AC_CHECK_HEADERS([sys/types.h]) AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([GLFW/glfw3.h]) AC_CHECK_HEADERS([GLFW/glfw3.h])
+2413 -5
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
#version 330 #version 460
uniform float iTime; uniform float iTime;
uniform vec2 iResolution; uniform vec2 iResolution;
+2 -1
View File
@@ -2,8 +2,9 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <linmath.h>
#include "file.h" #include "file.h"
#include "glfw.h"
#include "shaders.h" #include "shaders.h"
#include "types.h" #include "types.h"
#include "window.h" #include "window.h"
+1 -1
View File
@@ -1,9 +1,9 @@
#include <stddef.h> #include <stddef.h>
#include <stdio.h>
#include <linmath.h> #include <linmath.h>
#include "constants.h" #include "constants.h"
#include "glfw.h"
#include "types.h" #include "types.h"
// TODO split into smaller functions // TODO split into smaller functions
+5 -1
View File
@@ -1,9 +1,13 @@
#include <stdbool.h> #include <stdbool.h>
#include <time.h> #include <time.h>
#include <glad/gl.h>
#include <linmath.h> #include <linmath.h>
#include "glfw.h" #ifndef GLFW_INCLUDE_NONE
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#endif
#ifndef TYPES_H #ifndef TYPES_H
#define TYPES_H #define TYPES_H
+4 -3
View File
@@ -4,9 +4,10 @@
#include <linmath.h> #include <linmath.h>
#include "config.h" #include "config.h"
#include "glfw.h"
#include "types.h" #include "types.h"
#include "glfw.h"
// TODO split into smaller functions // TODO split into smaller functions
// TODO custom struct to remove glfw in signature // TODO custom struct to remove glfw in signature
void *init_window(Window **window, Parameters params, void *init_window(Window **window, Parameters params,
@@ -25,8 +26,8 @@ void *init_window(Window **window, Parameters params,
} }
// add context to window before creation // add context to window before creation
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_DECORATED, 0); glfwWindowHint(GLFW_DECORATED, 0);