GL3.0 spec says it clearlyOriginally Posted by bakura
Read section 3.12.2 Shader Outputs.
You bind output variables from fragment shader with glBindFragDataLocation before linking your program:
This means myVec41 will go to first draw buffer and myVec42 will go to second. You specifiy draw buffers with glDrawBuffers function.Code :glBindFragDataLocation(programId, 0, "myVec41"); glBindFragDataLocation(programId, 1, "myVec42"); glLinkProgram(programId);



Read section 3.12.2 Shader Outputs.
