Opengl 4.1 introduce separate program:
But i have problem, how to separate set “uniform block” and “Texture” for each shader stage?
// i bind a pipeline, but how to separate set "Uniform block" and // "Texture" for each shader stage. glBindProgramPipeline(PipelineID); //i want separate set texture for each stage glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, TextureID); //Uniform block too, i want separate set for each stage. glBindBufferBase(GL_UNIFORM_BUFFER, 0, VarBufferBlockID);
Ps: Sorry, i can’t find anywhere to insert code, so i highlight it. thanks in advance.