Advertisement
cr1901

Create your own Arwing- Vertices and Triangles for OpenGL

Mar 25th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.73 KB | None | 0 0
  1. static float g_vertices[16][3] = {
  2.    /* { -10.0, -10.0,  10.0 },
  3.     {  10.0, -10.0,  10.0 },
  4.     {  10.0,  10.0,  10.0 },
  5.     { -10.0,  10.0,  10.0 },
  6.     { -10.0, -10.0, -10.0 },
  7.     {  10.0, -10.0, -10.0 },
  8.     {  10.0,  10.0, -10.0 },
  9.     { -10.0,  10.0, -10.0 } */
  10.    
  11.         { 0, 0, -10},
  12.     { 0, 1, 0},
  13.     {0, -6, 0},
  14.     {0, 2, 80},
  15.    
  16.         {36, 14, -40},
  17.     {20, -11, -20},
  18.     {-18, 9, -6},
  19.     {-10, 4, 0},
  20.     {20, 4, 0},
  21.     {-14, 10, 20},
  22.    
  23.         {-36, 14, -40},
  24.     {-20, -11, -20},
  25.     {18, 9, -6},
  26.     {10, 4, 0},
  27.     {-20, 4, 0},
  28.     {14, 10, 20}  
  29. };
  30. //gcc viewer.c -lglut32 -lglu32 -lopengl32 -l3ds
  31.  
  32. // Texture coodinate origin (0,0) is in bottom-left corner!
  33. static float g_texcoords[8][3] = {
  34.     {  0.00, 1.0 },
  35.     {  0.25, 1.0 },
  36.     {  0.50, 1.0 },
  37.     {  0.75, 1.0 },
  38.     {  0.00, 0.0 },
  39.     {  0.25, 0.0 },
  40.     {  0.50, 0.0 },
  41.     {  0.75, 0.0 }
  42. };
  43.  
  44.  
  45. // CCW
  46. static unsigned short g_indices[20][3] = {
  47.         { 0, 1, 7 },
  48.     { 0, 1, 13 },
  49.     { 0, 2, 7 },
  50.     { 0, 2, 13 },
  51.         { 2, 3, 7 },
  52.     { 2, 3, 13 },
  53.     { 7, 9, 11 },
  54.     { 5, 13, 15 },
  55.         { 6, 7, 14 },
  56.     { 8, 12, 13 },
  57.     { 6, 10, 14 },
  58.     { 4, 8, 12 },
  59.         { 6, 7, 10 },
  60.     { 4, 12, 13 },  
  61.     { 1, 7, 13 }//,
  62.    
  63.     //{ 7, 14, 10 },
  64.     //  { 13, 8, 5 },
  65.     //{ 8, 10, 5 },
  66.     //{ 4, 11, 9 },
  67.     //{ 12, 11, 4 }
  68.    
  69.    
  70.     /*  { 0, 10, 1 },
  71.     { 1, 11, 0 },
  72.     { 10, 11, 1 },
  73.     { 11, 2, 0 },
  74.         { 0, 2, 10 },
  75.     { 3, 11, 10 },
  76.     { 3, 2, 11 },
  77.     { 10, 2, 3 },
  78.         { 11, 12, 9 },
  79.     { 4, 9, 12 },
  80.     { 11, 13, 5 },
  81.     { 8, 13, 10 },
  82.         { 6, 15, 11 },
  83.     { 11, 15, 6 },
  84.     { 10, 14, 7 },
  85.     { 7, 14, 10 },
  86.         { 13, 8, 5 },
  87.     { 8, 10, 5 },
  88.     { 4, 11, 9 },
  89.     { 12, 11, 4 } */
  90. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement