Am 19.05.2010 um 00:38 schrieb Roderick Colenbrander:
This patch series removes the responsibility for enabling/disabling the texture_target from the 'set_shader' stage of the blit_shader.
I disagree with this patch. glEnable(GL_TEXTURE_2D) is the fixed function pipline's way of putting the right texture target into the "TEX dst, src, sampler, dimension" instruction. They are in the ARB blitter only because of my laziness - it is using the fixed function pipeline instead of an equivalent shader.
So if you want to get rid of the glEnable / glDisable calls you should instead use ARB shaders which match the fixed function pipeline's functionality, e.g.
TEX result.color, fragment.texcoord[0], texture[0], 2D; (for the 2D case)
ffp_blit will keep calling glEnable / glDisable GL_TEXTURE_...
At a later stage I might disallow calling set_shader when we don't need the shader.
How does the caller know when a shader is needed?