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.

192 lines
4.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 CallLight(void)
  21. {
  22. long i, j;
  23. Output("glLighti, ");
  24. Output("glLightf\n");
  25. for (i = 0; enum_LightName[i].value != -1; i++) {
  26. for (j = 0; enum_LightParameter[j].value != -1; j++) {
  27. if (enum_LightParameter[j].value == GL_AMBIENT) {
  28. continue;
  29. } else if (enum_LightParameter[j].value == GL_DIFFUSE) {
  30. continue;
  31. } else if (enum_LightParameter[j].value == GL_SPECULAR) {
  32. continue;
  33. } else if (enum_LightParameter[j].value == GL_POSITION) {
  34. continue;
  35. } else if (enum_LightParameter[j].value == GL_SPOT_DIRECTION) {
  36. continue;
  37. }
  38. Output("\t%s, %s\n", enum_LightName[i].name, enum_LightParameter[j].name);
  39. glLighti(enum_LightName[i].value, enum_LightParameter[j].value, 0);
  40. glLightf(enum_LightName[i].value, enum_LightParameter[j].value, 0.0);
  41. ProbeEnum();
  42. }
  43. }
  44. Output("\n");
  45. Output("glLightiv, ");
  46. Output("glLightfv\n");
  47. for (i = 0; enum_LightName[i].value != -1; i++) {
  48. for (j = 0; enum_LightParameter[j].value != -1; j++) {
  49. Output("\t%s, %s\n", enum_LightName[i].name, enum_LightParameter[j].name);
  50. {
  51. static GLint buf[] = {
  52. 0, 0, 0, 0
  53. };
  54. glLightiv(enum_LightName[i].value, enum_LightParameter[j].value, buf);
  55. }
  56. {
  57. static GLfloat buf[] = {
  58. 0.0, 0.0, 0.0, 0.0
  59. };
  60. glLightfv(enum_LightName[i].value, enum_LightParameter[j].value, buf);
  61. }
  62. ProbeEnum();
  63. }
  64. }
  65. Output("\n");
  66. }
  67. void CallLightModel(void)
  68. {
  69. long i;
  70. Output("glLightModeli, ");
  71. Output("glLightModelf\n");
  72. for (i = 0; enum_LightModelParameter[i].value != -1; i++) {
  73. if (enum_LightModelParameter[i].value == GL_LIGHT_MODEL_AMBIENT) {
  74. continue;
  75. }
  76. Output("\t%s\n", enum_LightModelParameter[i].name);
  77. glLightModeli(enum_LightModelParameter[i].value, 0);
  78. glLightModelf(enum_LightModelParameter[i].value, 0.0);
  79. ProbeEnum();
  80. }
  81. Output("\n");
  82. Output("glLightModeliv, ");
  83. Output("glLightModelfv\n");
  84. for (i = 0; enum_LightModelParameter[i].value != -1; i++) {
  85. Output("\t%s\n", enum_LightModelParameter[i].name);
  86. {
  87. static GLint buf[] = {
  88. 0, 0, 0, 0
  89. };
  90. glLightModeliv(enum_LightModelParameter[i].value, buf);
  91. }
  92. {
  93. static GLfloat buf[] = {
  94. 0.0, 0.0, 0.0, 0.0
  95. };
  96. glLightModelfv(enum_LightModelParameter[i].value, buf);
  97. }
  98. ProbeEnum();
  99. }
  100. Output("\n");
  101. }
  102. void CallLineStipple(void)
  103. {
  104. Output("glLineStipple\n");
  105. glLineStipple(1, ~0);
  106. Output("\n");
  107. }
  108. void CallLineWidth(void)
  109. {
  110. Output("glLineWidth\n");
  111. glLineWidth(1.0);
  112. Output("\n");
  113. }
  114. void CallListBase(void)
  115. {
  116. Output("glListBase\n");
  117. glListBase(1);
  118. Output("\n");
  119. }
  120. void CallLoadIdentity(void)
  121. {
  122. Output("glLoadIdentity\n");
  123. glLoadIdentity();
  124. Output("\n");
  125. }
  126. void CallLoadMatrix(void)
  127. {
  128. Output("glLoadMatrixf, ");
  129. Output("glLoadMatrixd\n");
  130. {
  131. static GLfloat buf[] = {
  132. 1.0, 0.0, 0.0, 0.0,
  133. 0.0, 1.0, 0.0, 0.0,
  134. 0.0, 0.0, 1.0, 0.0,
  135. 0.0, 0.0, 0.0, 1.0
  136. };
  137. glLoadMatrixf(buf);
  138. }
  139. {
  140. static GLdouble buf[] = {
  141. 1.0, 0.0, 0.0, 0.0,
  142. 0.0, 1.0, 0.0, 0.0,
  143. 0.0, 0.0, 1.0, 0.0,
  144. 0.0, 0.0, 0.0, 1.0
  145. };
  146. glLoadMatrixd(buf);
  147. }
  148. Output("\n");
  149. }
  150. void CallLoadName(void)
  151. {
  152. Output("glLoadName\n");
  153. glLoadName(1);
  154. Output("\n");
  155. }
  156. void CallLogicOp(void)
  157. {
  158. long i;
  159. Output("glLogicOp\n");
  160. for (i = 0; enum_LogicOp[i].value != -1; i++) {
  161. Output("\t%s\n", enum_LogicOp[i].name);
  162. glLogicOp(enum_LogicOp[i].value);
  163. ProbeEnum();
  164. }
  165. Output("\n");
  166. }