I was trying regular blending to composite 3 or 4 textures along with the polygon color. It’s ended up rather tricky and someone mentioned I should look into doing it with a pixel shader instead. I was following this tutorial. http://www.lighthouse3d.com/opengl/glsl/index.php?oglexample1
I can get it to compile with no errors but nothing shows up. So I had a few questions to make sure I was doing things right. First of all is that all the code necessary for a program to use a shader. Second can you have a fragment shader without a vertex shader? Third what do the lines…
const char * vv = vs;
const char * ff = fs;
do? Well not what they do, I know that, but how important are they? Because I’m using c# and not c++ and it doesn’t like the fact that those lines are stuck in the middle. Oh and I am right in thinking that this will paint every fragment red right?
void main(void)
{
gl_FragColor = vec4 (1.0,0.0,0.0, 1.0);
}
I know these are newbie questions, but you got to learn somehow.