9 Commits
v1.4 ... v1.4.1

Author SHA1 Message Date
Jarcode
273cca946e Merge branch 'master' of https://github.com/wacossusca34/glava 2018-03-04 12:49:51 -08:00
Jarcode
95ceadf0e1 Merge branch 'unstable' 2018-03-04 12:49:23 -08:00
Jarcode
f32f0ded0f Version increase 2018-03-04 12:41:51 -08:00
Jarcode
3a1dcac8c9 Fixed texture load order, closes #28 2018-03-04 12:40:17 -08:00
Levi Webb
8adc8fe459 Merge pull request #26 from coderobe/master
Fix LDFLAGS
2018-03-02 17:41:49 -08:00
Robin Broda
e2f32a14cf Fix LDFLAGS 2018-03-02 18:40:35 +01:00
Levi Webb
318b4b3395 Update README.md 2018-02-20 19:05:00 -08:00
Levi Webb
b89fcd2e44 Merge pull request #23 from Aaahh/patch-3
Update Package names
2018-02-17 17:18:15 -08:00
Aaahh Ahh
baed3086d0 Update Package names
libpulse and libxext6-dev don't exist, also add libglx0 as it's not installed by default
2018-02-17 15:25:36 -05:00
4 changed files with 15 additions and 14 deletions

View File

@@ -53,7 +53,7 @@ ifeq ($(INSTALL),osx)
SHADER_DIR = Library/glava
endif
LDFLAGS = $(ASAN) -lpulse -lpulse-simple -pthread $(LDFLAGS_GLFW) -ldl -lm -lX11 -lXext $(LDFLAGS_GLX)
LDFLAGS += $(ASAN) -lpulse -lpulse-simple -pthread $(LDFLAGS_GLFW) -ldl -lm -lX11 -lXext $(LDFLAGS_GLX)
PYTHON = python

View File

@@ -1,7 +1,7 @@
## GLava
<img align="left" width="200" height="200" src="https://thumbs.gfycat.com/DefiantInformalIndianspinyloach-size_restricted.gif" />
GLava is an OpenGL audio spectrum visualizer. Its primary use case is for desktop windows or backgrounds. Displayed to the left is the `radial` shader module, and [here is a demonstration video](https://streamable.com/dgpj8). Development is active, and reporting issues is encouranged.
**GLava** is an OpenGL audio spectrum visualizer. Its primary use case is for desktop windows or backgrounds. Displayed to the left is the `radial` shader module, and [here is a demonstration video](https://streamable.com/dgpj8). Development is active, and reporting issues is encouranged.
**Compiling** (Or use the [`glava-git` AUR package](https://aur.archlinux.org/packages/glava-git/))**:**
@@ -31,7 +31,7 @@ You can pass `BUILD=debug` to the makefile for debug builds of both glad and gla
**Ubuntu/Debian users:** the following command ensures you have all the needed packages and headers to compile GLava:
```bash
sudo apt-get install libpulse libpulse-dev libglfw3 libglfw3-dev libxext6 libxext6-dev python make gcc
sudo apt-get install libpulse0 libpulse-dev libglfw3 libglfw3-dev libglx0 libxext6 libxext-dev python make gcc
```
## [Configuration](https://github.com/wacossusca34/glava/wiki)

View File

@@ -18,7 +18,7 @@
#include "render.h"
#include "xwin.h"
#define GLAVA_VERSION "1.4"
#define GLAVA_VERSION "1.4.1"
#ifdef GLAD_DEBUG
#define GLAVA_RELEASE_TYPE_PREFIX "debug, "
#else

View File

@@ -326,10 +326,8 @@ static GLuint create_1d_tex() {
}
static void update_1d_tex(GLuint tex, size_t w, float* data) {
float buf[w];
memcpy(buf, data, w * sizeof(float));
glBindTexture(GL_TEXTURE_1D, tex);
glTexImage1D(GL_TEXTURE_1D, 0, GL_R16, w, 0, GL_RED, GL_FLOAT, buf);
glTexImage1D(GL_TEXTURE_1D, 0, GL_R16, w, 0, GL_RED, GL_FLOAT, data);
}
#define BIND_VEC2 0
@@ -1361,7 +1359,7 @@ void rd_update(struct renderer* r, float* lb, float* rb, size_t bsz, bool modifi
for (t = 0; t < gl->stages_sz; ++t) {
bool needed[64] = { [ 0 ... 63 ] = false }; /* Load flags for each texture position */
bool load_flags[64] = { [ 0 ... 63 ] = false }; /* Load flags for each texture position */
/* Current shader program */
struct gl_sfbo* current = &gl->stages[t];
@@ -1428,6 +1426,10 @@ void rd_update(struct renderer* r, float* lb, float* rb, size_t bsz, bool modifi
/* Handle transformations and bindings for 1D samplers */
void handle_1d_tex(GLuint tex, float* buf, float* ubuf, size_t sz, int offset, bool audio) {
if (load_flags[offset])
goto bind_uniform;
load_flags[offset] = true;
/* Only apply transformations if the buffers we
were given are newly copied from PA */
@@ -1443,6 +1445,7 @@ void rd_update(struct renderer* r, float* lb, float* rb, size_t bsz, bool modifi
transform types are added) */
}
}
glActiveTexture(GL_TEXTURE0 + offset);
/* Update texture with our data */
update_1d_tex(tex, sz, gl->interpolate ? (ubuf ? ubuf : buf) : buf);
@@ -1526,11 +1529,9 @@ void rd_update(struct renderer* r, float* lb, float* rb, size_t bsz, bool modifi
tex = sm->tex; /* replace input texture with our processed one */
}
if (!needed[offset]) {
glActiveTexture(GL_TEXTURE0 + offset);
glBindTexture(GL_TEXTURE_1D, tex);
needed[offset] = true;
}
glActiveTexture(GL_TEXTURE0 + offset);
glBindTexture(GL_TEXTURE_1D, tex);
bind_uniform:
glUniform1i(bind->uniform, offset);
}