Changes between Version 3 and Version 4 of tutorial


Ignore:
Timestamp:
Jun 26, 2013, 10:16:11 PM (6 years ago)
Author:
leon
Comment:

Add color

Legend:

Unmodified
Added
Removed
Modified
  • tutorial

    v3 v4  
    8585
    8686
    87 === Exercise #1: ===
     87== Exercise #1: ==
    8888 1. Add RGB color to vertices with {{{ glColor3f(1.0, 0.4, 1.0);}}}.
    89  2. Replace single line drawing in {{{display}}} with the following snippet
     89 2. Replace single line drawing in {{{display()}}} with the following snippet
    9090 {{{
    9191#!c
     
    101101 and try to draw two wireframe triangles in a loop. Change primitive to {{{GL_LINE_LOOP}}}.
    102102 3. Draw two primitives with {{{GL_TRIANGLES}}}.
     103 4. Add different color to each vertex.
     104{{{
     105#!c
     106 GLfloat color[][3] = {
     107  {1, 0, 0}, {0, 1, 0}, {0, 0, 1},
     108  {1, 1, 0}, {0, 1, 1}, {1, 0, 1}};
     109}}}
    103110
    104