wip state
This commit is contained in:
@@ -125,11 +125,12 @@ make -f Makefile.dev release-arch
|
|||||||
- [x] random mode / demo mode with R/D key
|
- [x] random mode / demo mode with R/D key
|
||||||
- [x] Clean code and fix things
|
- [x] Clean code and fix things
|
||||||
- [ ] Midi
|
- [ ] Midi
|
||||||
- [ ] Read Midi events
|
- [x] Read Midi events
|
||||||
- [ ] Read midi mapping config file
|
- [x] Read midi mapping config file
|
||||||
- [ ] Write Midi events
|
- [ ] Write Midi events
|
||||||
|
- [ ] Send midi data to shaders
|
||||||
- [ ] Save midi state
|
- [ ] Save midi state
|
||||||
- [ ] State machine with A/B switch
|
- [x] State machine with A/B switch
|
||||||
- [ ] Tap-tempo feature
|
- [ ] Tap-tempo feature
|
||||||
- [ ] Clean code and fix things
|
- [ ] Clean code and fix things
|
||||||
- [x] Video input
|
- [x] Video input
|
||||||
|
|||||||
+6
-4
@@ -18,6 +18,8 @@
|
|||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <GLFW/glfw3native.h>
|
#include <GLFW/glfw3native.h>
|
||||||
|
|
||||||
|
static const GLuint unused_uniform = (GLuint)-1;
|
||||||
|
|
||||||
static void init_gl(ShaderProgram *program) {
|
static void init_gl(ShaderProgram *program) {
|
||||||
gladLoadGL(glfwGetProcAddress);
|
gladLoadGL(glfwGetProcAddress);
|
||||||
|
|
||||||
@@ -433,25 +435,25 @@ static void update_viewport(ShaderProgram program, SharedContext *context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void write_uniform_1f(GLuint location, float value) {
|
static void write_uniform_1f(GLuint location, float value) {
|
||||||
if (location != -1) {
|
if (location != unused_uniform) {
|
||||||
glUniform1f(location, (const GLfloat)value);
|
glUniform1f(location, (const GLfloat)value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write_uniform_1i(GLuint location, unsigned int value) {
|
static void write_uniform_1i(GLuint location, unsigned int value) {
|
||||||
if (location != -1) {
|
if (location != unused_uniform) {
|
||||||
glUniform1i(location, (const GLint)value);
|
glUniform1i(location, (const GLint)value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write_uniform_2f(GLuint location, vec2 *value) {
|
static void write_uniform_2f(GLuint location, vec2 *value) {
|
||||||
if (location != -1) {
|
if (location != unused_uniform) {
|
||||||
glUniform2fv(location, 1, (const GLfloat *)value);
|
glUniform2fv(location, 1, (const GLfloat *)value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static void write_uniform_3f(GLuint location, vec3 *value) {
|
// static void write_uniform_3f(GLuint location, vec3 *value) {
|
||||||
// if (location != -1) {
|
// if (location != unused_uniform) {
|
||||||
// glUniform3fv(location, 1, (const GLfloat *)value);
|
// glUniform3fv(location, 1, (const GLfloat *)value);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user