wip state

This commit is contained in:
2025-09-28 23:36:50 +02:00
parent 8511e50b6d
commit afb9fb9d13
2 changed files with 10 additions and 7 deletions
+4 -3
View File
@@ -125,11 +125,12 @@ make -f Makefile.dev release-arch
- [x] random mode / demo mode with R/D key
- [x] Clean code and fix things
- [ ] Midi
- [ ] Read Midi events
- [ ] Read midi mapping config file
- [x] Read Midi events
- [x] Read midi mapping config file
- [ ] Write Midi events
- [ ] Send midi data to shaders
- [ ] Save midi state
- [ ] State machine with A/B switch
- [x] State machine with A/B switch
- [ ] Tap-tempo feature
- [ ] Clean code and fix things
- [x] Video input
+6 -4
View File
@@ -18,6 +18,8 @@
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
static const GLuint unused_uniform = (GLuint)-1;
static void init_gl(ShaderProgram *program) {
gladLoadGL(glfwGetProcAddress);
@@ -433,25 +435,25 @@ static void update_viewport(ShaderProgram program, SharedContext *context) {
}
static void write_uniform_1f(GLuint location, float value) {
if (location != -1) {
if (location != unused_uniform) {
glUniform1f(location, (const GLfloat)value);
}
}
static void write_uniform_1i(GLuint location, unsigned int value) {
if (location != -1) {
if (location != unused_uniform) {
glUniform1i(location, (const GLint)value);
}
}
static void write_uniform_2f(GLuint location, vec2 *value) {
if (location != -1) {
if (location != unused_uniform) {
glUniform2fv(location, 1, (const GLfloat *)value);
}
}
// static void write_uniform_3f(GLuint location, vec3 *value) {
// if (location != -1) {
// if (location != unused_uniform) {
// glUniform3fv(location, 1, (const GLfloat *)value);
// }
// }