<<< Vertex and Fragment processing     Index     Using separate shaders >>>

6. Compiling a shader program


  1. Compile a vertex shader -> returns shader ID

  2. Compile a fragment shader -> returns shader ID

  3. Check for compilation errors

  4. Create a shader program -> returns program ID

  5. Attach to a vertex and fragemnt shaders to the program

  6. Link those two shaders together

  7. Use program ID before you render triangles

     


<<< Vertex and Fragment processing     Index     Using separate shaders >>>