Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
3.2 KiB

5 years ago
  1. /*
  2. ** Copyright 1992, Silicon Graphics, Inc.
  3. ** All Rights Reserved.
  4. **
  5. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. ** the contents of this file may not be disclosed to third parties, copied or
  7. ** duplicated in any form, in whole or in part, without the prior written
  8. ** permission of Silicon Graphics, Inc.
  9. **
  10. ** RESTRICTED RIGHTS LEGEND:
  11. ** Use, duplication or disclosure by the Government is subject to restrictions
  12. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. ** rights reserved under the Copyright Laws of the United States.
  16. */
  17. #include <windows.h>
  18. #include <GL/gl.h>
  19. #include "shell.h"
  20. void CallEdgeFlag(void)
  21. {
  22. long i;
  23. Output("glEdgeFlag, ");
  24. Output("glEdgeFlagv\n");
  25. for (i = 0; enum_Boolean[i].value != -1; i++) {
  26. Output("\t%s\n", enum_Boolean[i].name);
  27. glEdgeFlag((unsigned char)enum_Boolean[i].value);
  28. {
  29. GLboolean buf[1];
  30. buf[0] = (unsigned char)enum_Boolean[i].value;
  31. glEdgeFlagv(buf);
  32. }
  33. ProbeEnum();
  34. }
  35. Output("\n");
  36. }
  37. void CallEnableIsEnableDisable(void)
  38. {
  39. long i, x;
  40. Output("glEnable, ");
  41. Output("glIsEnabled, ");
  42. Output("glDisable\n");
  43. for (i = 0; enum_Enable[i].value != -1; i++) {
  44. if (enum_Enable[i].value == GL_TEXTURE_GEN_R) {
  45. continue;
  46. } else if (enum_Enable[i].value == GL_TEXTURE_GEN_Q) {
  47. continue;
  48. }
  49. Output("\t%s\n", enum_Enable[i].name);
  50. glEnable(enum_Enable[i].value);
  51. x = glIsEnabled(enum_Enable[i].value);
  52. glDisable(enum_Enable[i].value);
  53. ProbeEnum();
  54. }
  55. Output("\n");
  56. }
  57. void CallEvalCoord(void)
  58. {
  59. float x, y;
  60. x = 0.0;
  61. y = 0.0;
  62. Output("glEvalCoord1f, ");
  63. Output("glEvalCoord1fv, ");
  64. Output("glEvalCoord1d, ");
  65. Output("glEvalCoord1dv, ");
  66. Output("glEvalCoord2f, ");
  67. Output("glEvalCoord2fv, ");
  68. Output("glEvalCoord2d, ");
  69. Output("glEvalCoord2dv\n");
  70. glEvalCoord1f((GLfloat)x);
  71. {
  72. GLfloat buf[1];
  73. buf[0] = (float)x;
  74. glEvalCoord1fv(buf);
  75. }
  76. glEvalCoord1d((GLdouble)x);
  77. {
  78. GLdouble buf[1];
  79. buf[0] = (GLdouble)x;
  80. glEvalCoord1dv(buf);
  81. }
  82. glEvalCoord2f((GLfloat)x, (GLfloat)y);
  83. {
  84. GLfloat buf[2];
  85. buf[0] = (GLfloat)x;
  86. buf[1] = (GLfloat)y;
  87. glEvalCoord2fv(buf);
  88. }
  89. glEvalCoord2d((GLdouble)x, (GLdouble)y);
  90. {
  91. GLdouble buf[2];
  92. buf[0] = (GLdouble)x;
  93. buf[1] = (GLdouble)y;
  94. glEvalCoord2dv(buf);
  95. }
  96. Output("\n");
  97. }
  98. void CallEvalMesh1(void)
  99. {
  100. long i;
  101. Output("glEvalMesh1\n");
  102. for (i = 0; enum_MeshMode1[i].value != -1; i++) {
  103. Output("\t%s\n", enum_MeshMode1[i].name);
  104. glEvalMesh1(enum_MeshMode1[i].value, 0, 1);
  105. ProbeEnum();
  106. }
  107. Output("\n");
  108. }
  109. void CallEvalMesh2(void)
  110. {
  111. long i;
  112. Output("glEvalMesh2\n");
  113. for (i = 0; enum_MeshMode2[i].value != -1; i++) {
  114. Output("\t%s\n", enum_MeshMode2[i].name);
  115. glEvalMesh2(enum_MeshMode2[i].value, 0, 1, 0, 1);
  116. ProbeEnum();
  117. }
  118. Output("\n");
  119. }
  120. void CallEvalPoint1(void)
  121. {
  122. Output("glEvalPoint1\n");
  123. glEvalPoint1(0);
  124. Output("\n");
  125. }
  126. void CallEvalPoint2(void)
  127. {
  128. Output("glEvalPoint2\n");
  129. glEvalPoint2(0, 0);
  130. Output("\n");
  131. }