<<< Vertex and Fragment processing | Index | Using separate shaders >>> |
Compile a vertex shader -> returns shader ID
Compile a fragment shader -> returns shader ID
Check for compilation errors
Create a shader program -> returns program ID
Retain this program ID in your code
Attach to a vertex and fragemnt shaders to the program
Link those two shaders together
Use program ID before you render triangles
Separate shaders may be used for different objects (see next slide)
<<< Vertex and Fragment processing | Index | Using separate shaders >>> |