diff --git a/src/Reveal.cpp b/src/Reveal.cpp index 85e9518f69bbe9d39456f16dd3ec56b37093f4ce..8469e8af1df028f9c8937e82668dd89331644c3f 100644 --- a/src/Reveal.cpp +++ b/src/Reveal.cpp @@ -170,7 +170,7 @@ void Reveal::init() { glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); //FIXME GLFW 3.3 glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); glfwWindowHint(GLFW_AUTO_ICONIFY, GL_FALSE); -#ifdef GL42 +#ifdef GL43 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); #else diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 9c8812e57948d215abcb70ef6e5881c6a86f5be5..05ad254f36ebdbf89aff9e3a02b268f8c72e477d 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -78,7 +78,7 @@ int AudioManager::rtaudio_callback(void *outbuf, void *inbuf, unsigned int nFram memset(buf, 0, nFrames*data->nChannel*sizeof(float)); memset(data->buffer, 0, data->bufSize*sizeof(float)); memset(data->mixBuffer, 0, nFrames*sizeof(float)); -// cout<<"AudioManager : Could not read buffer"<<endl; + //cout<<"AudioManager : Could not read buffer"<<endl; } } else { diff --git a/src/shaders/render43.fs b/src/shaders/render43.fs index 55aa96e93ea358fd125392a6917cebb0d814a6b1..6730d5150c56c98addb001f6651e93b19b1cf2be 100644 --- a/src/shaders/render43.fs +++ b/src/shaders/render43.fs @@ -398,38 +398,38 @@ void main(void) { ratioWithinBox.z=0.5; } switch(shapeGeom) { - case BOX : { - vec3 q = abs(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))*2.0 - vec3(1.0,1.0,1.0); - gradRatio = 1.0-abs(length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0)); - } break; + case BOX : { + vec3 q = abs(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))*2.0 - vec3(1.0,1.0,1.0); + gradRatio = 1.0-abs(length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0)); + } break; case SPHERE : { - gradRatio = length(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))/0.5; - } break; + gradRatio = length(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))/0.5; + } break; case PATH : { - vec2 d = abs(vec2(length((ratioWithinBox.xy-vec2(0.5, 0.5))*2.0), (ratioWithinBox.z-0.5)*2.0)) - vec2(1.0,1.0); - gradRatio = 1.0 - abs(min(max(d.x,d.y),0.0) + length(max(d,0.0))); + vec2 d = abs(vec2(length((ratioWithinBox.xy-vec2(0.5, 0.5))*2.0), (ratioWithinBox.z-0.5)*2.0)) - vec2(1.0,1.0); + gradRatio = 1.0 - abs(min(max(d.x,d.y),0.0) + length(max(d,0.0))); - } break; + } break; case TUBE : { - vec2 d = abs(vec2(length((ratioWithinBox.xz-vec2(0.5, 0.5))*2.0), (ratioWithinBox.y-0.5)*2.0)) - vec2(1.0,1.0); - gradRatio = 1.0 - abs(min(max(d.x,d.y),0.0) + length(max(d,0.0))); - } break; + vec2 d = abs(vec2(length((ratioWithinBox.xz-vec2(0.5, 0.5))*2.0), (ratioWithinBox.y-0.5)*2.0)) - vec2(1.0,1.0); + gradRatio = 1.0 - abs(min(max(d.x,d.y),0.0) + length(max(d,0.0))); + } break; case CONE : { - float q = length((ratioWithinBox.xz - vec2(0.5,0.5))*2.0); - gradRatio = 1.0-abs(max(dot(vec2(0.5,0.5), vec2(q,(ratioWithinBox.y-1.0))), -1.0-(ratioWithinBox.y-1.0))); - } break; + float q = length((ratioWithinBox.xz - vec2(0.5,0.5))*2.0); + gradRatio = 1.0-abs(max(dot(vec2(0.5,0.5), vec2(q,(ratioWithinBox.y-1.0))), -1.0-(ratioWithinBox.y-1.0))); + } break; case FRAME : { - //FIXME compute frame SDF - vec3 q = abs(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))*2.0 - vec3(1.0,1.0,1.0); - gradRatio = 1.0-abs(length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0)); - } break; + //FIXME compute frame SDF + vec3 q = abs(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))*2.0 - vec3(1.0,1.0,1.0); + gradRatio = 1.0-abs(length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0)); + } break; case MODEL : { - gradRatio = texture(surfDistTex, ratioWithinBox).r * structureRatio; - } break; + gradRatio = texture(surfDistTex, ratioWithinBox).r * structureRatio; + } break; default :{ - //defaults to sphere - gradRatio = length(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))/0.5; - } break; + //defaults to sphere + gradRatio = length(ratioWithinBox.xyz - vec3(0.5,0.5,0.5))/0.5; + } break; } }