Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

ofShader::load vs ofShader::setupShaderFromFile

$
0
0

When I try to substitute the line

shader.load("shadersGL3/shader");

with

shader.setupShaderFromFile(GL_FRAGMENT_SHADER, "shadersGL3/shader.frag");
shader.setupShaderFromFile(GL_VERTEX_SHADER, "shadersGL3/shader.vert");
shader.linkProgram();

the program tends to not work anymore. Why does that always happen? I want to use this because then I can reuse the same standard pass vertex shader and only change the fragment shaders for post processing effects. The above code sample is from the simpleTexture tutorial on github, which I tested, and it also doesn't work. Any ideas?


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>