Compare commits
8
Commits
v1.2.2
..
6110e1df7f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6110e1df7f | ||
|
|
3a228122cf | ||
|
|
a440535953 | ||
|
|
cec3d54685 | ||
|
|
7355d0937c | ||
|
|
1c44239a8d | ||
|
|
73dd4b75d3 | ||
|
|
50f5d6f6cb |
@@ -39,7 +39,6 @@ build-no-video:
|
||||
-lm -lGL -lglfw -lasound \
|
||||
-Wall -Wextra \
|
||||
-Wno-format-truncation \
|
||||
-Wno-unused-parameter \
|
||||
-DGLFW_INCLUDE_NONE \
|
||||
-DGLFW_NATIVE_INCLUDE_NONE \
|
||||
-DLOG_USE_COLOR \
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
pkgname=forge-steel
|
||||
pkgver=1.2.2
|
||||
pkgver=1.2.4
|
||||
pkgrel=1
|
||||
pkgdesc="Fusion Of Real Time Generative Effects"
|
||||
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64' 'riscv64')
|
||||
depends=('glfw>=1:3', 'v4l-utils>=1.32', 'alsa-lib>=1.2', 'libglvnd>=1.7')
|
||||
url="https://git.klemek.fr/klemek/forge-steel"
|
||||
source=("${pkgname}-steel-${pkgver}.tar.gz::https://git.klemek.fr/klemek/forge-steel/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
|
||||
sha256sums=('e1c7c7bb9a614609b3d7e8647511c23cbe7a7a3d715b0c236b627c4e2dcbf4dd')
|
||||
sha256sums=('a34c7f8101d8d947e26bee1fa5ab8d87f4292014e5ef17d03eb34fefb387db9e')
|
||||
srcdir=build
|
||||
backup=("usr/share/${pkgname}")
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
AC_INIT([forge], [steel-1.2.2], [klemek.dev@proton.me])
|
||||
AC_INIT([forge], [steel-1.2.4], [klemek.dev@proton.me])
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_PROG_CC
|
||||
|
||||
|
||||
+12
-12
@@ -279,9 +279,9 @@ GROUP_3_2_Z=11089
|
||||
ARI_COUNT=62
|
||||
ARI_1=GROUP_3_1_Y
|
||||
ARI_2=GROUP_3_2_Z
|
||||
ARI_3=GROUP_2_5_4
|
||||
ARI_4=GROUP_2_5_4
|
||||
ARI_5=GROUP_2_5_4
|
||||
ARI_3=GROUP_2_5_X_4
|
||||
ARI_4=GROUP_2_5_Y_4
|
||||
ARI_5=GROUP_2_5_Z_4
|
||||
ARI_6=GROUP_2_2_X_4
|
||||
ARI_7=GROUP_2_2_Y_4
|
||||
ARI_8=GROUP_2_2_Z_4
|
||||
@@ -294,9 +294,9 @@ ARI_14=GROUP_2_6_Z_4
|
||||
ARI_15=GROUP_2_7_X_4
|
||||
ARI_16=GROUP_2_7_Y_4
|
||||
ARI_17=GROUP_2_7_Z_4
|
||||
ARI_18=GROUP_2_5_5
|
||||
ARI_19=GROUP_2_5_5
|
||||
ARI_20=GROUP_2_5_5
|
||||
ARI_18=GROUP_2_5_X_5
|
||||
ARI_19=GROUP_2_5_Y_5
|
||||
ARI_20=GROUP_2_5_Z_5
|
||||
ARI_21=GROUP_2_2_X_5
|
||||
ARI_22=GROUP_2_2_Y_5
|
||||
ARI_23=GROUP_2_2_Z_5
|
||||
@@ -309,9 +309,9 @@ ARI_29=GROUP_2_6_Z_5
|
||||
ARI_30=GROUP_2_7_X_5
|
||||
ARI_31=GROUP_2_7_Y_5
|
||||
ARI_32=GROUP_2_7_Z_5
|
||||
ARI_33=GROUP_2_5_6
|
||||
ARI_34=GROUP_2_5_6
|
||||
ARI_35=GROUP_2_5_6
|
||||
ARI_33=GROUP_2_5_X_6
|
||||
ARI_34=GROUP_2_5_Y_6
|
||||
ARI_35=GROUP_2_5_Z_6
|
||||
ARI_36=GROUP_2_2_X_6
|
||||
ARI_37=GROUP_2_2_Y_6
|
||||
ARI_38=GROUP_2_2_Z_6
|
||||
@@ -324,9 +324,9 @@ ARI_44=GROUP_2_6_Z_6
|
||||
ARI_45=GROUP_2_7_X_6
|
||||
ARI_46=GROUP_2_7_Y_6
|
||||
ARI_47=GROUP_2_7_Z_6
|
||||
ARI_48=GROUP_2_5_7
|
||||
ARI_49=GROUP_2_5_7
|
||||
ARI_50=GROUP_2_5_7
|
||||
ARI_48=GROUP_2_5_X_7
|
||||
ARI_49=GROUP_2_5_Y_7
|
||||
ARI_50=GROUP_2_5_Z_7
|
||||
ARI_51=GROUP_2_2_X_7
|
||||
ARI_52=GROUP_2_2_Y_7
|
||||
ARI_53=GROUP_2_2_Z_7
|
||||
|
||||
+9
-4
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Loader generated by glad 2.0.8 on Wed May 13 21:57:23 2026
|
||||
* Loader generated by glad 2.0.8 on Thu Aug 27 15:42:48 2026
|
||||
*
|
||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||
*
|
||||
* Generator: C/C++
|
||||
* Specification: gl
|
||||
* Extensions: 4
|
||||
* Extensions: 5
|
||||
*
|
||||
* APIs:
|
||||
* - gl:compatibility=4.6
|
||||
@@ -19,10 +19,10 @@
|
||||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='gl:compatibility=4.6' --extensions='GL_ARB_direct_state_access,GL_EXT_EGL_image_storage,GL_EXT_direct_state_access,GL_KHR_debug' c --header-only --loader
|
||||
* --api='gl:compatibility=4.6' --extensions='GL_ARB_arrays_of_arrays,GL_ARB_direct_state_access,GL_EXT_EGL_image_storage,GL_EXT_direct_state_access,GL_KHR_debug' c --header-only --loader
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=gl%3Acompatibility%3D4.6&extensions=GL_ARB_direct_state_access%2CGL_EXT_EGL_image_storage%2CGL_EXT_direct_state_access%2CGL_KHR_debug&generator=c&options=HEADER_ONLY%2CLOADER
|
||||
* http://glad.sh/#api=gl%3Acompatibility%3D4.6&extensions=GL_ARB_arrays_of_arrays%2CGL_ARB_direct_state_access%2CGL_EXT_EGL_image_storage%2CGL_EXT_direct_state_access%2CGL_KHR_debug&generator=c&options=HEADER_ONLY%2CLOADER
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -2403,6 +2403,8 @@ GLAD_API_CALL int GLAD_GL_VERSION_4_4;
|
||||
GLAD_API_CALL int GLAD_GL_VERSION_4_5;
|
||||
#define GL_VERSION_4_6 1
|
||||
GLAD_API_CALL int GLAD_GL_VERSION_4_6;
|
||||
#define GL_ARB_arrays_of_arrays 1
|
||||
GLAD_API_CALL int GLAD_GL_ARB_arrays_of_arrays;
|
||||
#define GL_ARB_direct_state_access 1
|
||||
GLAD_API_CALL int GLAD_GL_ARB_direct_state_access;
|
||||
#define GL_EXT_EGL_image_storage 1
|
||||
@@ -6395,6 +6397,7 @@ int GLAD_GL_VERSION_4_3 = 0;
|
||||
int GLAD_GL_VERSION_4_4 = 0;
|
||||
int GLAD_GL_VERSION_4_5 = 0;
|
||||
int GLAD_GL_VERSION_4_6 = 0;
|
||||
int GLAD_GL_ARB_arrays_of_arrays = 0;
|
||||
int GLAD_GL_ARB_direct_state_access = 0;
|
||||
int GLAD_GL_EXT_EGL_image_storage = 0;
|
||||
int GLAD_GL_EXT_direct_state_access = 0;
|
||||
@@ -9290,6 +9293,7 @@ static int glad_gl_find_extensions_gl(void) {
|
||||
char **exts_i = NULL;
|
||||
if (!glad_gl_get_extensions(&exts, &exts_i)) return 0;
|
||||
|
||||
GLAD_GL_ARB_arrays_of_arrays = glad_gl_has_extension(exts, exts_i, "GL_ARB_arrays_of_arrays");
|
||||
GLAD_GL_ARB_direct_state_access = glad_gl_has_extension(exts, exts_i, "GL_ARB_direct_state_access");
|
||||
GLAD_GL_EXT_EGL_image_storage = glad_gl_has_extension(exts, exts_i, "GL_EXT_EGL_image_storage");
|
||||
GLAD_GL_EXT_direct_state_access = glad_gl_has_extension(exts, exts_i, "GL_EXT_direct_state_access");
|
||||
@@ -9571,3 +9575,4 @@ void gladLoaderUnloadGL(void) {
|
||||
#endif
|
||||
|
||||
#endif /* GLAD_GL_IMPLEMENTATION */
|
||||
|
||||
|
||||
+24
-3
@@ -7,12 +7,13 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
#include "args.h"
|
||||
#include "config.h"
|
||||
#include "string.h"
|
||||
|
||||
#define STR_IMPL_(x) #x // stringify argument
|
||||
#define STR(x) STR_IMPL_(x) // indirection to expand argument macros
|
||||
|
||||
static void print_help(int status_code) {
|
||||
puts(
|
||||
PACKAGE
|
||||
@@ -48,6 +49,8 @@ static void print_help(int status_code) {
|
||||
"[--wayland] "
|
||||
"[--cocoa] "
|
||||
"[--win32] "
|
||||
"[-oma=MAJOR] "
|
||||
"[-omi=MINOR] "
|
||||
"\n\n"
|
||||
"Fusion Of Real-time Generative Effects.\n\n"
|
||||
"options:\n"
|
||||
@@ -91,7 +94,13 @@ static void print_help(int status_code) {
|
||||
" --x11 force X11 GLFW backend\n"
|
||||
" --wayland force Wayland GLFW backend\n"
|
||||
" --cocoa force Cocoa GLFW backend\n"
|
||||
" --win32 force Win32 GLFW backend\n");
|
||||
" --win32 force Win32 GLFW backend\n"
|
||||
" -oma, --opengl-major-version OpenGL major version "
|
||||
"(default: " STR(
|
||||
OPENGL_MAJOR_VERSION) ")\n"
|
||||
" -omi, --opengl-minor-version OpenGL "
|
||||
"minor version (default: " STR(
|
||||
OPENGL_MINOR_VERSION) ")\n");
|
||||
exit(status_code);
|
||||
}
|
||||
|
||||
@@ -163,6 +172,8 @@ void args_parse(Parameters *params, int argc, char **argv) {
|
||||
params->trace_midi = false;
|
||||
params->trace_fps = false;
|
||||
params->glfw_backend = GLFW_BACKEND_ANY;
|
||||
params->opengl_major = OPENGL_MAJOR_VERSION;
|
||||
params->opengl_minor = OPENGL_MINOR_VERSION;
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
arg = argv[i];
|
||||
@@ -239,6 +250,16 @@ void args_parse(Parameters *params, int argc, char **argv) {
|
||||
params->glfw_backend = GLFW_BACKEND_COCOA;
|
||||
} else if (is_arg(arg, "--win32")) {
|
||||
params->glfw_backend = GLFW_BACKEND_WIN32;
|
||||
} else if (is_arg(arg, "-oma") || is_arg(arg, "--opengl-major-version")) {
|
||||
params->opengl_major = parse_uint(arg, value);
|
||||
if (params->opengl_major == 0) {
|
||||
invalid_value(arg, value);
|
||||
}
|
||||
} else if (is_arg(arg, "-omi") || is_arg(arg, "--opengl-minor-version")) {
|
||||
params->opengl_minor = parse_uint(arg, value);
|
||||
if (params->opengl_major == 0) {
|
||||
invalid_value(arg, value);
|
||||
}
|
||||
} else {
|
||||
#ifdef VIDEO_IN
|
||||
if (is_arg(arg, "-vi") || is_arg(arg, "--video-in")) {
|
||||
|
||||
@@ -87,4 +87,23 @@
|
||||
#define MAX_TAP_VALUES 10
|
||||
#endif
|
||||
|
||||
/* OPENGL */
|
||||
|
||||
#ifndef OPENGL_MAJOR_VERSION
|
||||
#define OPENGL_MAJOR_VERSION 4
|
||||
#endif
|
||||
|
||||
#ifndef OPENGL_MINOR_VERSION
|
||||
#define OPENGL_MINOR_VERSION 6
|
||||
#endif
|
||||
|
||||
/* GLFW CONSTANTS */
|
||||
#ifndef GLFW_BACKENDS
|
||||
#define GLFW_BACKEND_ANY 0
|
||||
#define GLFW_BACKEND_X11 1
|
||||
#define GLFW_BACKEND_WAYLAND 2
|
||||
#define GLFW_BACKEND_COCOA 3
|
||||
#define GLFW_BACKEND_WIN32 4
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
+2
-8
@@ -3,16 +3,10 @@
|
||||
#ifndef CONSTANTS_H
|
||||
#define CONSTANTS_H
|
||||
|
||||
static const unsigned int GLFW_BACKEND_ANY = 0;
|
||||
static const unsigned int GLFW_BACKEND_X11 = 1;
|
||||
static const unsigned int GLFW_BACKEND_WAYLAND = 2;
|
||||
static const unsigned int GLFW_BACKEND_COCOA = 3;
|
||||
static const unsigned int GLFW_BACKEND_WIN32 = 4;
|
||||
|
||||
static const char *vertex_shader_text =
|
||||
"#version 460\n"
|
||||
"#version 140\n"
|
||||
"const mat4 mvp = "
|
||||
"{{2.,0.,0.,0.},{0.,2.,0.,0.},{0.,0.,2.,0.},{-1.,-1.,1.,1.}};\n"
|
||||
"mat4(vec4(2.,0.,0.,0.),vec4(0.,2.,0.,0.),vec4(0.,0.,2.,0.),vec4(-1.,-1.,1.,1.));\n"
|
||||
"in vec2 vPos;\n"
|
||||
"out vec2 vUV;\n"
|
||||
"void main()\n"
|
||||
|
||||
+4
-2
@@ -293,7 +293,8 @@ static bool init(const Parameters *params) {
|
||||
|
||||
if (params->output) {
|
||||
window_output = window_init(PACKAGE " " VERSION, params->output_screen,
|
||||
params->windowed, NULL, key_callback);
|
||||
params->windowed, params->opengl_major,
|
||||
params->opengl_minor, NULL, key_callback);
|
||||
|
||||
window_use(window_output, &context);
|
||||
|
||||
@@ -305,7 +306,8 @@ static bool init(const Parameters *params) {
|
||||
if (params->monitor) {
|
||||
window_monitor =
|
||||
window_init(PACKAGE " " VERSION " (monitor)", params->monitor_screen,
|
||||
params->windowed, window_output, key_callback);
|
||||
params->windowed, params->opengl_major,
|
||||
params->opengl_minor, window_output, key_callback);
|
||||
|
||||
window_use(window_monitor, &context);
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ static void gl_debug_callback(GLenum source, GLenum type, GLuint id,
|
||||
|
||||
#endif /* GL_DEBUG */
|
||||
|
||||
static bool check_eglerror_ro(const char *context) {
|
||||
static bool check_eglerror_ro(__attribute__((unused)) const char *context) {
|
||||
#ifdef VIDEO_IN
|
||||
unsigned int code;
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ typedef struct Parameters {
|
||||
bool trace_midi;
|
||||
bool trace_fps;
|
||||
unsigned int glfw_backend;
|
||||
unsigned int opengl_major;
|
||||
unsigned int opengl_minor;
|
||||
} Parameters;
|
||||
|
||||
// file.c
|
||||
|
||||
+13
-7
@@ -5,8 +5,6 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "constants.h"
|
||||
|
||||
#include "window.h"
|
||||
|
||||
static void init_glfw(void (*error_callback)(int, const char *),
|
||||
@@ -20,6 +18,7 @@ static void init_glfw(void (*error_callback)(int, const char *),
|
||||
log_info("[GLFW] %s", glfwGetVersionString());
|
||||
|
||||
switch (backend) {
|
||||
#ifdef GLFW_PLATFORM
|
||||
case GLFW_BACKEND_X11:
|
||||
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
|
||||
log_info("[GLFW] platform: X11");
|
||||
@@ -36,6 +35,7 @@ static void init_glfw(void (*error_callback)(int, const char *),
|
||||
glfwInitHint(GLFW_PLATFORM, GLFW_BACKEND_WIN32);
|
||||
log_info("[GLFW] platform: Win32");
|
||||
break;
|
||||
#endif /* GLFW_PLATFORM */
|
||||
default:
|
||||
log_info("[GLFW] platform: Any");
|
||||
break;
|
||||
@@ -69,7 +69,9 @@ static GLFWmonitor *get_monitor(unsigned char monitor_index) {
|
||||
}
|
||||
|
||||
static GLFWwindow *
|
||||
create_window(GLFWmonitor *monitor, const char *title, Window *shared_context,
|
||||
create_window(GLFWmonitor *monitor, const char *title,
|
||||
const unsigned int opengl_major, const unsigned int opengl_minor,
|
||||
Window *shared_context,
|
||||
void (*key_callback)(Window *, int, int, int, int)) {
|
||||
GLFWwindow *window;
|
||||
|
||||
@@ -82,12 +84,14 @@ create_window(GLFWmonitor *monitor, const char *title, Window *shared_context,
|
||||
glfwWindowHint(GLFW_FOCUS_ON_SHOW, GLFW_FALSE);
|
||||
|
||||
// Context related hints
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, opengl_major);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, opengl_minor);
|
||||
#ifdef GL_DEBUG
|
||||
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GLFW_TRUE);
|
||||
#endif
|
||||
if (opengl_major > 4 || (opengl_major == 3 && opengl_minor >= 2)) {
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
}
|
||||
|
||||
// create fullscreen window in selected monitor
|
||||
window = glfwCreateWindow(1, 1, title, monitor, shared_context);
|
||||
@@ -122,14 +126,16 @@ void window_terminate() {
|
||||
}
|
||||
|
||||
Window *window_init(const char *title, unsigned char monitor_index,
|
||||
bool windowed, Window *shared_context,
|
||||
bool windowed, const unsigned int opengl_major,
|
||||
const unsigned int opengl_minor, Window *shared_context,
|
||||
void (*key_callback)(Window *, int, int, int, int)) {
|
||||
GLFWwindow *window;
|
||||
GLFWmonitor *monitor;
|
||||
|
||||
monitor = windowed ? NULL : get_monitor(monitor_index);
|
||||
|
||||
window = create_window(monitor, title, shared_context, key_callback);
|
||||
window = create_window(monitor, title, opengl_major, opengl_minor,
|
||||
shared_context, key_callback);
|
||||
|
||||
use_window(window);
|
||||
|
||||
|
||||
+2
-1
@@ -8,7 +8,8 @@ void window_startup(void (*error_callback)(int, const char *), const unsigned in
|
||||
void window_terminate();
|
||||
|
||||
Window *window_init(const char *title, unsigned char monitor_index,
|
||||
bool windowed, Window *shared_context,
|
||||
bool windowed, const unsigned int opengl_major,
|
||||
const unsigned int opengl_minor, Window *shared_context,
|
||||
void (*key_callback)(Window *, int, int, int, int));
|
||||
|
||||
void window_update_title(Window *window, const char *title);
|
||||
|
||||
Reference in New Issue
Block a user