Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. /* Copyright (c) Mark J. Kilgard, 1994, 1997. */
  3.  
  4. /**
  5. (c) Copyright 1993, Silicon Graphics, Inc.
  6.  
  7. ALL RIGHTS RESERVED
  8.  
  9. Permission to use, copy, modify, and distribute this software
  10. for any purpose and without fee is hereby granted, provided
  11. that the above copyright notice appear in all copies and that
  12. both the copyright notice and this permission notice appear in
  13. supporting documentation, and that the name of Silicon
  14. Graphics, Inc. not be used in advertising or publicity
  15. pertaining to distribution of the software without specific,
  16. written prior permission.
  17.  
  18. THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
  19. "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
  20. OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
  21. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  22. EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE
  23. ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
  24. CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
  25. INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
  26. SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
  27. NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY
  28. OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  29. ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
  30. PERFORMANCE OF THIS SOFTWARE.
  31.  
  32. US Government Users Restricted Rights
  33.  
  34. Use, duplication, or disclosure by the Government is subject to
  35. restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  36. (c)(1)(ii) of the Rights in Technical Data and Computer
  37. Software clause at DFARS 252.227-7013 and/or in similar or
  38. successor clauses in the FAR or the DOD or NASA FAR
  39. Supplement.  Unpublished-- rights reserved under the copyright
  40. laws of the United States.  Contractor/manufacturer is Silicon
  41. Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA
  42. 94039-7311.
  43.  
  44. OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  45. */
  46.  
  47. #include <math.h>
  48. #include "gluos.h"
  49. #include "gluint.h"
  50. #include <stdio.h>
  51. #include <stdlib.h>
  52. #include <math.h>
  53. #include <GL/gl.h>
  54. #include <GL/glu.h>
  55.  
  56. //#include "glutint.h"
  57. #define GLUTAPIENTRY
  58.  
  59. /* Some <math.h> files do not define M_PI... */
  60. #ifndef M_PI
  61. #define M_PI 3.14159265358979323846
  62. #endif
  63.  
  64. static GLUquadricObj *quadObj;
  65.  
  66. #define QUAD_OBJ_INIT() { if(!quadObj) initQuadObj(); }
  67.  
  68.  
  69. static void
  70. initQuadObj(void)
  71. {
  72.     quadObj = gluNewQuadric();
  73.     if (!quadObj)
  74.     {
  75.         printf("%s: out of memory.\n", __FUNCTION__);
  76.         abort();
  77.     };
  78. //    __glutFatalError("out of memory.");
  79. }
  80.  
  81. /* CENTRY */
  82. void GLUTAPIENTRY
  83. glutWireSphere(GLdouble radius, GLint slices, GLint stacks)
  84. {
  85.   QUAD_OBJ_INIT();
  86.   gluQuadricDrawStyle(quadObj, GLU_LINE);
  87.   gluQuadricNormals(quadObj, GLU_SMOOTH);
  88.   /* If we ever changed/used the texture or orientation state
  89.      of quadObj, we'd need to change it to the defaults here
  90.      with gluQuadricTexture and/or gluQuadricOrientation. */
  91.   gluSphere(quadObj, radius, slices, stacks);
  92. }
  93.  
  94. void GLUTAPIENTRY
  95. glutSolidSphere(GLdouble radius, GLint slices, GLint stacks)
  96. {
  97.   QUAD_OBJ_INIT();
  98.   gluQuadricDrawStyle(quadObj, GLU_FILL);
  99.   gluQuadricNormals(quadObj, GLU_SMOOTH);
  100.   /* If we ever changed/used the texture or orientation state
  101.      of quadObj, we'd need to change it to the defaults here
  102.      with gluQuadricTexture and/or gluQuadricOrientation. */
  103.   gluSphere(quadObj, radius, slices, stacks);
  104. }
  105.  
  106. void GLUTAPIENTRY
  107. glutWireCone(GLdouble base, GLdouble height,
  108.   GLint slices, GLint stacks)
  109. {
  110.   QUAD_OBJ_INIT();
  111.   gluQuadricDrawStyle(quadObj, GLU_LINE);
  112.   gluQuadricNormals(quadObj, GLU_SMOOTH);
  113.   /* If we ever changed/used the texture or orientation state
  114.      of quadObj, we'd need to change it to the defaults here
  115.      with gluQuadricTexture and/or gluQuadricOrientation. */
  116.   gluCylinder(quadObj, base, 0.0, height, slices, stacks);
  117. }
  118.  
  119. void GLUTAPIENTRY
  120. glutSolidCone(GLdouble base, GLdouble height,
  121.   GLint slices, GLint stacks)
  122. {
  123.   QUAD_OBJ_INIT();
  124.   gluQuadricDrawStyle(quadObj, GLU_FILL);
  125.   gluQuadricNormals(quadObj, GLU_SMOOTH);
  126.   /* If we ever changed/used the texture or orientation state
  127.      of quadObj, we'd need to change it to the defaults here
  128.      with gluQuadricTexture and/or gluQuadricOrientation. */
  129.   gluCylinder(quadObj, base, 0.0, height, slices, stacks);
  130. }
  131.  
  132. /* ENDCENTRY */
  133.  
  134. static void
  135. drawBox(GLfloat size, GLenum type)
  136. {
  137.   static GLfloat n[6][3] =
  138.   {
  139.     {-1.0, 0.0, 0.0},
  140.     {0.0, 1.0, 0.0},
  141.     {1.0, 0.0, 0.0},
  142.     {0.0, -1.0, 0.0},
  143.     {0.0, 0.0, 1.0},
  144.     {0.0, 0.0, -1.0}
  145.   };
  146.   static GLint faces[6][4] =
  147.   {
  148.     {0, 1, 2, 3},
  149.     {3, 2, 6, 7},
  150.     {7, 6, 5, 4},
  151.     {4, 5, 1, 0},
  152.     {5, 6, 2, 1},
  153.     {7, 4, 0, 3}
  154.   };
  155.   GLfloat v[8][3];
  156.   GLint i;
  157.  
  158.   v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2;
  159.   v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2;
  160.   v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2;
  161.   v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2;
  162.   v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2;
  163.   v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2;
  164.  
  165.   for (i = 5; i >= 0; i--) {
  166.     glBegin(type);
  167.     glNormal3fv(&n[i][0]);
  168.     glVertex3fv(&v[faces[i][0]][0]);
  169.     glVertex3fv(&v[faces[i][1]][0]);
  170.     glVertex3fv(&v[faces[i][2]][0]);
  171.     glVertex3fv(&v[faces[i][3]][0]);
  172.     glEnd();
  173.   }
  174. }
  175.  
  176. /* CENTRY */
  177. void GLUTAPIENTRY
  178. glutWireCube(GLdouble size)
  179. {
  180.   drawBox(size, GL_LINE_LOOP);
  181. }
  182.  
  183. void GLUTAPIENTRY
  184. glutSolidCube(GLdouble size)
  185. {
  186.   drawBox(size, GL_QUADS);
  187. }
  188.  
  189. /* ENDCENTRY */
  190.  
  191. static void
  192. doughnut(GLfloat r, GLfloat R, GLint nsides, GLint rings)
  193. {
  194.   int i, j;
  195.   GLfloat theta, phi, theta1;
  196.   GLfloat cosTheta, sinTheta;
  197.   GLfloat cosTheta1, sinTheta1;
  198.   GLfloat ringDelta, sideDelta;
  199.  
  200.   ringDelta = 2.0 * M_PI / rings;
  201.   sideDelta = 2.0 * M_PI / nsides;
  202.  
  203.   theta = 0.0;
  204.   cosTheta = 1.0;
  205.   sinTheta = 0.0;
  206.   for (i = rings - 1; i >= 0; i--) {
  207.     theta1 = theta + ringDelta;
  208.     cosTheta1 = cos(theta1);
  209.     sinTheta1 = sin(theta1);
  210.     glBegin(GL_QUAD_STRIP);
  211.     phi = 0.0;
  212.     for (j = nsides; j >= 0; j--) {
  213.       GLfloat cosPhi, sinPhi, dist;
  214.  
  215.       phi += sideDelta;
  216.       cosPhi = cos(phi);
  217.       sinPhi = sin(phi);
  218.       dist = R + r * cosPhi;
  219.  
  220.       glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
  221.       glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);
  222.       glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
  223.       glVertex3f(cosTheta * dist, -sinTheta * dist,  r * sinPhi);
  224.     }
  225.     glEnd();
  226.     theta = theta1;
  227.     cosTheta = cosTheta1;
  228.     sinTheta = sinTheta1;
  229.   }
  230. }
  231.  
  232. /* CENTRY */
  233. void GLUTAPIENTRY
  234. glutWireTorus(GLdouble innerRadius, GLdouble outerRadius,
  235.   GLint nsides, GLint rings)
  236. {
  237.   glPushAttrib(GL_POLYGON_BIT);
  238.   glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
  239.   doughnut(innerRadius, outerRadius, nsides, rings);
  240.   glPopAttrib();
  241. }
  242.  
  243. void GLUTAPIENTRY
  244. glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius,
  245.   GLint nsides, GLint rings)
  246. {
  247.   doughnut(innerRadius, outerRadius, nsides, rings);
  248. }
  249.  
  250. /* ENDCENTRY */
  251.  
  252. static GLfloat dodec[20][3];
  253.  
  254. static void
  255. initDodecahedron(void)
  256. {
  257.   GLfloat alpha, beta;
  258.  
  259.   alpha = sqrt(2.0 / (3.0 + sqrt(5.0)));
  260.   beta = 1.0 + sqrt(6.0 / (3.0 + sqrt(5.0)) -
  261.     2.0 + 2.0 * sqrt(2.0 / (3.0 + sqrt(5.0))));
  262.   /* *INDENT-OFF* */
  263.   dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;
  264.   dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;
  265.   dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;
  266.   dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;
  267.   dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;
  268.   dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;
  269.   dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;
  270.   dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;
  271.   dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;
  272.   dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;
  273.   dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;
  274.   dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;
  275.   dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;
  276.   dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;
  277.   dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;
  278.   dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;
  279.   dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;
  280.   dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;
  281.   dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;
  282.   dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
  283.   /* *INDENT-ON* */
  284.  
  285. }
  286.  
  287. #define DIFF3(_a,_b,_c) { \
  288.     (_c)[0] = (_a)[0] - (_b)[0]; \
  289.     (_c)[1] = (_a)[1] - (_b)[1]; \
  290.     (_c)[2] = (_a)[2] - (_b)[2]; \
  291. }
  292.  
  293. static void
  294. crossprod(GLfloat v1[3], GLfloat v2[3], GLfloat prod[3])
  295. {
  296.   GLfloat p[3];         /* in case prod == v1 or v2 */
  297.  
  298.   p[0] = v1[1] * v2[2] - v2[1] * v1[2];
  299.   p[1] = v1[2] * v2[0] - v2[2] * v1[0];
  300.   p[2] = v1[0] * v2[1] - v2[0] * v1[1];
  301.   prod[0] = p[0];
  302.   prod[1] = p[1];
  303.   prod[2] = p[2];
  304. }
  305.  
  306. static void
  307. normalize(GLfloat v[3])
  308. {
  309.   GLfloat d;
  310.  
  311.   d = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
  312.   if (d == 0.0) {
  313. //    __glutWarning("normalize: zero length vector");
  314.     v[0] = d = 1.0;
  315.   }
  316.   d = 1 / d;
  317.   v[0] *= d;
  318.   v[1] *= d;
  319.   v[2] *= d;
  320. }
  321.  
  322. static void
  323. pentagon(int a, int b, int c, int d, int e, GLenum shadeType)
  324. {
  325.   GLfloat n0[3], d1[3], d2[3];
  326.  
  327.   DIFF3(dodec[a], dodec[b], d1);
  328.   DIFF3(dodec[b], dodec[c], d2);
  329.   crossprod(d1, d2, n0);
  330.   normalize(n0);
  331.  
  332.   glBegin(shadeType);
  333.   glNormal3fv(n0);
  334.   glVertex3fv(&dodec[a][0]);
  335.   glVertex3fv(&dodec[b][0]);
  336.   glVertex3fv(&dodec[c][0]);
  337.   glVertex3fv(&dodec[d][0]);
  338.   glVertex3fv(&dodec[e][0]);
  339.   glEnd();
  340. }
  341.  
  342. static void
  343. dodecahedron(GLenum type)
  344. {
  345.   static int inited = 0;
  346.  
  347.   if (inited == 0) {
  348.     inited = 1;
  349.     initDodecahedron();
  350.   }
  351.   pentagon(0, 1, 9, 16, 5, type);
  352.   pentagon(1, 0, 3, 18, 7, type);
  353.   pentagon(1, 7, 11, 10, 9, type);
  354.   pentagon(11, 7, 18, 19, 6, type);
  355.   pentagon(8, 17, 16, 9, 10, type);
  356.   pentagon(2, 14, 15, 6, 19, type);
  357.   pentagon(2, 13, 12, 4, 14, type);
  358.   pentagon(2, 19, 18, 3, 13, type);
  359.   pentagon(3, 0, 5, 12, 13, type);
  360.   pentagon(6, 15, 8, 10, 11, type);
  361.   pentagon(4, 17, 8, 15, 14, type);
  362.   pentagon(4, 12, 5, 16, 17, type);
  363. }
  364.  
  365. /* CENTRY */
  366. void GLUTAPIENTRY
  367. glutWireDodecahedron(void)
  368. {
  369.   dodecahedron(GL_LINE_LOOP);
  370. }
  371.  
  372. void GLUTAPIENTRY
  373. glutSolidDodecahedron(void)
  374. {
  375.   dodecahedron(GL_TRIANGLE_FAN);
  376. }
  377.  
  378. /* ENDCENTRY */
  379.  
  380. static void
  381. recorditem(GLfloat * n1, GLfloat * n2, GLfloat * n3,
  382.   GLenum shadeType)
  383. {
  384.   GLfloat q0[3], q1[3];
  385.  
  386.   DIFF3(n1, n2, q0);
  387.   DIFF3(n2, n3, q1);
  388.   crossprod(q0, q1, q1);
  389.   normalize(q1);
  390.  
  391.   glBegin(shadeType);
  392.   glNormal3fv(q1);
  393.   glVertex3fv(n1);
  394.   glVertex3fv(n2);
  395.   glVertex3fv(n3);
  396.   glEnd();
  397. }
  398.  
  399. static void
  400. subdivide(GLfloat * v0, GLfloat * v1, GLfloat * v2,
  401.   GLenum shadeType)
  402. {
  403.   int depth;
  404.   GLfloat w0[3], w1[3], w2[3];
  405.   GLfloat l;
  406.   int i, j, k, n;
  407.  
  408.   depth = 1;
  409.   for (i = 0; i < depth; i++) {
  410.     for (j = 0; i + j < depth; j++) {
  411.       k = depth - i - j;
  412.       for (n = 0; n < 3; n++) {
  413.         w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;
  414.         w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])
  415.           / depth;
  416.         w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])
  417.           / depth;
  418.       }
  419.       l = sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);
  420.       w0[0] /= l;
  421.       w0[1] /= l;
  422.       w0[2] /= l;
  423.       l = sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);
  424.       w1[0] /= l;
  425.       w1[1] /= l;
  426.       w1[2] /= l;
  427.       l = sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);
  428.       w2[0] /= l;
  429.       w2[1] /= l;
  430.       w2[2] /= l;
  431.       recorditem(w1, w0, w2, shadeType);
  432.     }
  433.   }
  434. }
  435.  
  436. static void
  437. drawtriangle(int i, GLfloat data[][3], int ndx[][3],
  438.   GLenum shadeType)
  439. {
  440.   GLfloat *x0, *x1, *x2;
  441.  
  442.   x0 = data[ndx[i][0]];
  443.   x1 = data[ndx[i][1]];
  444.   x2 = data[ndx[i][2]];
  445.   subdivide(x0, x1, x2, shadeType);
  446. }
  447.  
  448. /* octahedron data: The octahedron produced is centered at the
  449.    origin and has radius 1.0 */
  450. static GLfloat odata[6][3] =
  451. {
  452.   {1.0, 0.0, 0.0},
  453.   {-1.0, 0.0, 0.0},
  454.   {0.0, 1.0, 0.0},
  455.   {0.0, -1.0, 0.0},
  456.   {0.0, 0.0, 1.0},
  457.   {0.0, 0.0, -1.0}
  458. };
  459.  
  460. static int ondex[8][3] =
  461. {
  462.   {0, 4, 2},
  463.   {1, 2, 4},
  464.   {0, 3, 4},
  465.   {1, 4, 3},
  466.   {0, 2, 5},
  467.   {1, 5, 2},
  468.   {0, 5, 3},
  469.   {1, 3, 5}
  470. };
  471.  
  472. static void
  473. octahedron(GLenum shadeType)
  474. {
  475.   int i;
  476.  
  477.   for (i = 7; i >= 0; i--) {
  478.     drawtriangle(i, odata, ondex, shadeType);
  479.   }
  480. }
  481.  
  482. /* CENTRY */
  483. void GLUTAPIENTRY
  484. glutWireOctahedron(void)
  485. {
  486.   octahedron(GL_LINE_LOOP);
  487. }
  488.  
  489. void GLUTAPIENTRY
  490. glutSolidOctahedron(void)
  491. {
  492.   octahedron(GL_TRIANGLES);
  493. }
  494.  
  495. /* ENDCENTRY */
  496.  
  497. /* icosahedron data: These numbers are rigged to make an
  498.    icosahedron of radius 1.0 */
  499.  
  500. #define X .525731112119133606
  501. #define Z .850650808352039932
  502.  
  503. static GLfloat idata[12][3] =
  504. {
  505.   {-X, 0, Z},
  506.   {X, 0, Z},
  507.   {-X, 0, -Z},
  508.   {X, 0, -Z},
  509.   {0, Z, X},
  510.   {0, Z, -X},
  511.   {0, -Z, X},
  512.   {0, -Z, -X},
  513.   {Z, X, 0},
  514.   {-Z, X, 0},
  515.   {Z, -X, 0},
  516.   {-Z, -X, 0}
  517. };
  518.  
  519. static int index[20][3] =
  520. {
  521.   {0, 4, 1},
  522.   {0, 9, 4},
  523.   {9, 5, 4},
  524.   {4, 5, 8},
  525.   {4, 8, 1},
  526.   {8, 10, 1},
  527.   {8, 3, 10},
  528.   {5, 3, 8},
  529.   {5, 2, 3},
  530.   {2, 7, 3},
  531.   {7, 10, 3},
  532.   {7, 6, 10},
  533.   {7, 11, 6},
  534.   {11, 0, 6},
  535.   {0, 1, 6},
  536.   {6, 1, 10},
  537.   {9, 0, 11},
  538.   {9, 11, 2},
  539.   {9, 2, 5},
  540.   {7, 2, 11},
  541. };
  542.  
  543. static void
  544. icosahedron(GLenum shadeType)
  545. {
  546.   int i;
  547.  
  548.   for (i = 19; i >= 0; i--) {
  549.     drawtriangle(i, idata, index, shadeType);
  550.   }
  551. }
  552.  
  553. /* CENTRY */
  554. void GLUTAPIENTRY
  555. glutWireIcosahedron(void)
  556. {
  557.   icosahedron(GL_LINE_LOOP);
  558. }
  559.  
  560. void GLUTAPIENTRY
  561. glutSolidIcosahedron(void)
  562. {
  563.   icosahedron(GL_TRIANGLES);
  564. }
  565.  
  566. /* ENDCENTRY */
  567.  
  568. /* tetrahedron data: */
  569.  
  570. #define T       1.73205080756887729
  571.  
  572. static GLfloat tdata[4][3] =
  573. {
  574.   {T, T, T},
  575.   {T, -T, -T},
  576.   {-T, T, -T},
  577.   {-T, -T, T}
  578. };
  579.  
  580. static int tndex[4][3] =
  581. {
  582.   {0, 1, 3},
  583.   {2, 1, 0},
  584.   {3, 2, 0},
  585.   {1, 2, 3}
  586. };
  587.  
  588. static void
  589. tetrahedron(GLenum shadeType)
  590. {
  591.   int i;
  592.  
  593.   for (i = 3; i >= 0; i--)
  594.     drawtriangle(i, tdata, tndex, shadeType);
  595. }
  596.  
  597. /* CENTRY */
  598. void GLUTAPIENTRY
  599. glutWireTetrahedron(void)
  600. {
  601.   tetrahedron(GL_LINE_LOOP);
  602. }
  603.  
  604. void GLUTAPIENTRY
  605. glutSolidTetrahedron(void)
  606. {
  607.   tetrahedron(GL_TRIANGLES);
  608. }
  609.  
  610. /* ENDCENTRY */
  611.