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.

153 lines
3.5 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 CallFeedbackBuffer(void)
  21. {
  22. GLfloat buf[1];
  23. long i;
  24. Output("glFeedbackBuffer\n");
  25. for (i = 0; enum_FeedBackMode[i].value != -1; i++) {
  26. Output("\t%s\n", enum_FeedBackMode[i].name);
  27. glFeedbackBuffer(1, enum_FeedBackMode[i].value, buf);
  28. ProbeEnum();
  29. }
  30. Output("\n");
  31. }
  32. void CallFinish(void)
  33. {
  34. Output("glFinish\n");
  35. glFinish();
  36. Output("\n");
  37. }
  38. void CallFlush(void)
  39. {
  40. Output("glFlush\n");
  41. glFlush();
  42. Output("\n");
  43. }
  44. void CallFog(void)
  45. {
  46. long i, j;
  47. Output("glFogi, ");
  48. Output("glFogf\n");
  49. for (i = 0; enum_FogParameter[i].value != -1; i++) {
  50. if (enum_FogParameter[i].value == GL_FOG_COLOR) {
  51. continue;
  52. }
  53. Output("\t%s\n", enum_FogParameter[i].name);
  54. switch (enum_FogParameter[i].value) {
  55. case GL_FOG_MODE:
  56. for (j = 0; enum_FogMode[j].value != -1; j++) {
  57. Output("\t%s, %s\n", enum_FogParameter[i].name, enum_FogMode[j].name);
  58. glFogi(enum_FogParameter[i].value, (GLint)enum_FogMode[j].value);
  59. glFogf(enum_FogParameter[i].value, (GLfloat)enum_FogMode[j].value);
  60. ProbeEnum();
  61. }
  62. break;
  63. case GL_FOG_START:
  64. case GL_FOG_END:
  65. case GL_FOG_INDEX:
  66. case GL_FOG_DENSITY:
  67. Output("\t%s\n", enum_FogParameter[i].name);
  68. glFogi(enum_FogParameter[i].value, 0);
  69. glFogf(enum_FogParameter[i].value, 0.0);
  70. ProbeEnum();
  71. break;
  72. }
  73. ProbeEnum();
  74. }
  75. Output("\n");
  76. Output("glFogiv, ");
  77. Output("glFogfv\n");
  78. for (i = 0; enum_FogParameter[i].value != -1; i++) {
  79. switch (enum_FogParameter[i].value) {
  80. case GL_FOG_MODE:
  81. for (j = 0; enum_FogMode[j].value != -1; j++) {
  82. Output("\t%s, %s\n", enum_FogParameter[i].name, enum_FogMode[j].name);
  83. {
  84. GLint buf[1];
  85. buf[0] = (GLint)enum_FogMode[j].value;
  86. glFogiv(enum_FogParameter[i].value, buf);
  87. }
  88. {
  89. GLfloat buf[1];
  90. buf[0] = (GLfloat)enum_FogMode[j].value;
  91. glFogfv(enum_FogParameter[i].value, buf);
  92. }
  93. ProbeEnum();
  94. }
  95. break;
  96. case GL_FOG_START:
  97. case GL_FOG_END:
  98. case GL_FOG_COLOR:
  99. case GL_FOG_INDEX:
  100. case GL_FOG_DENSITY:
  101. Output("\t%s\n", enum_FogParameter[i].name);
  102. {
  103. static GLint buf[] = {
  104. 0, 0, 0, 0
  105. };
  106. glFogiv(enum_FogParameter[i].value, buf);
  107. }
  108. {
  109. static GLfloat buf[] = {
  110. 0.0, 0.0, 0.0, 0.0
  111. };
  112. glFogfv(enum_FogParameter[i].value, buf);
  113. }
  114. ProbeEnum();
  115. break;
  116. }
  117. }
  118. Output("\n");
  119. }
  120. void CallFrontFace(void)
  121. {
  122. long i;
  123. Output("glFrontFace\n");
  124. for (i = 0; enum_FrontFaceDirection[i].value != -1; i++) {
  125. Output("\t%s\n", enum_FrontFaceDirection[i].name);
  126. glFrontFace(enum_FrontFaceDirection[i].value);
  127. ProbeEnum();
  128. }
  129. Output("\n");
  130. }
  131. void CallFrustum(void)
  132. {
  133. Output("glFrustum\n");
  134. glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 2.0);
  135. Output("\n");
  136. }