still adapting to Opengl (3.2) after some years on the DX10 bandwagon. I hope you can help me shedding some light on a bunch of questions whose place is just a step beyond the “basic” stuff I suppose.
1) Depth/Alpha test
Is it possible that, despite getting rid of the fixed function pipeline, depth and alpha test are still managed by a GlEnable/GlDisable switch? I am wondering because I am not finding any reference to depth or alpha test in GLSL.
2) Multiple fragment and vertex shaders
I’ve seen that an arbitrary number of shaders can be attached to a program, so I wonder what does that mean exactly. Let’s say I need to render meshes in two different ways: normal and alpha blended. Right now I’d stick to having to programs: one with a vertex and fragment shader designed to render solid objects, one with another vertex and another fragment shader designed to render transparent objects. I will then switch between the two programs as needed. Is that right? In that case what’s the use of N fragment and N vertex shaders in a single program?
3) Opengl “costs” reference sheet
Trying to avoid performance pitfalls that would be handy. Has anyone compiled something like that? I am wondering, for example, how expensive is to enable/disable certain things, if a 2dTextureArray with a single slice performs a lot worse than a classic 2dTextures, etc. etc.
Thanks in advance for your help,