Changes between Version 1 and Version 2 of tutorial


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

Legacy finished.

Legend:

Unmodified
Added
Removed
Modified
  • tutorial

    v1 v2  
    1 = OpenGL tutorial =
     1= OpenGL hands-on tutorial =
    22
    33
     
    7979and run it with
    8080{{{
    81 !sh
     81#!sh
    8282python first.py
    8383}}}
    8484
    8585
     86=== Exercise #1: ===
     87 1. Add RGB color to vertices with {{{ glColor3f(1.0, 0.4, 1.0);}}}.
     88 2. Replace single line drawing in {{{display}}} with the following snippet
     89 {{{
     90#!c
     91   GLfloat vertices[][2] = {
     92    { -0.90, -0.90 }, // Triangle 1
     93    {  0.85, -0.90 },
     94    { -0.90,  0.85 },
     95    {  0.90, -0.85 }, // Triangle 2
     96    {  0.90,  0.90 },
     97    { -0.85,  0.90 }
     98   };
     99}}}
     100 and try to draw two wireframe triangles in a loop. Change primitive to {{{GL_LINE_LOOP}}}.
     101 3. Draw two primitives with {{{GL_TRIANGLES}}}.
     102
     103
     104