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

ofShader::load vs ofShader::setupShaderFromFile

$
0
0

Hi there!

Since you are using GL3, you should also do:

shader.bindDefaults();

Before linkProgram(). Alternately, you can also do:

shader.load("vertex.vert", "frag_#.frag");

So that you can still share the same vertex shader.

You could also check the vboMeshDrawInstancedExample example, where it uses a shared_ptr. It's a simple, but nice way to use/play with shaders.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



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