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.

186 lines
3.6 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 CallVertex(void)
  21. {
  22. GLfloat x, y, z, w;
  23. x = 1.0;
  24. y = 1.0;
  25. z = 1.0;
  26. w = 1.0;
  27. Output("glVertex2s, ");
  28. Output("glVertex2sv, ");
  29. Output("glVertex2i, ");
  30. Output("glVertex2iv, ");
  31. Output("glVertex2f, ");
  32. Output("glVertex2fv, ");
  33. Output("glVertex2d, ");
  34. Output("glVertex2dv, ");
  35. Output("glVertex3s, ");
  36. Output("glVertex3sv, ");
  37. Output("glVertex3i, ");
  38. Output("glVertex3iv, ");
  39. Output("glVertex3f, ");
  40. Output("glVertex3fv, ");
  41. Output("glVertex3d, ");
  42. Output("glVertex3dv, ");
  43. Output("glVertex4s, ");
  44. Output("glVertex4sv, ");
  45. Output("glVertex4i, ");
  46. Output("glVertex4iv, ");
  47. Output("glVertex4f, ");
  48. Output("glVertex4fv, ");
  49. Output("glVertex4d, ");
  50. Output("glVertex4dv\n");
  51. glVertex2s((GLshort)x, (GLshort)y);
  52. {
  53. GLshort buf[2];
  54. buf[0] = (GLshort)x;
  55. buf[1] = (GLshort)y;
  56. glVertex2sv(buf);
  57. }
  58. glVertex2i((GLint)x, (GLint)y);
  59. {
  60. GLint buf[2];
  61. buf[0] = (GLint)x;
  62. buf[1] = (GLint)y;
  63. glVertex2iv(buf);
  64. }
  65. glVertex2f((GLfloat)x, (GLfloat)y);
  66. {
  67. GLfloat buf[2];
  68. buf[0] = (GLfloat)x;
  69. buf[1] = (GLfloat)y;
  70. glVertex2fv(buf);
  71. }
  72. glVertex2d((GLdouble)x, (GLdouble)y);
  73. {
  74. GLdouble buf[2];
  75. buf[0] = (GLdouble)x;
  76. buf[1] = (GLdouble)y;
  77. glVertex2dv(buf);
  78. }
  79. glVertex3s((GLshort)x, (GLshort)y, (GLshort)z);
  80. {
  81. GLshort buf[3];
  82. buf[0] = (GLshort)x;
  83. buf[1] = (GLshort)y;
  84. buf[2] = (GLshort)z;
  85. glVertex3sv(buf);
  86. }
  87. glVertex3i((GLint)x, (GLint)y, (GLint)z);
  88. {
  89. GLint buf[3];
  90. buf[0] = (GLint)x;
  91. buf[1] = (GLint)y;
  92. buf[2] = (GLint)z;
  93. glVertex3iv(buf);
  94. }
  95. glVertex3f((GLfloat)x, (GLfloat)y, (GLfloat)z);
  96. {
  97. GLfloat buf[3];
  98. buf[0] = (GLfloat)x;
  99. buf[1] = (GLfloat)y;
  100. buf[2] = (GLfloat)z;
  101. glVertex3fv(buf);
  102. }
  103. glVertex3d((GLdouble)x, (GLdouble)y, (GLdouble)z);
  104. {
  105. GLdouble buf[3];
  106. buf[0] = (GLdouble)x;
  107. buf[1] = (GLdouble)y;
  108. buf[2] = (GLdouble)z;
  109. glVertex3dv(buf);
  110. }
  111. glVertex4s((GLshort)x, (GLshort)y, (GLshort)z, (GLshort)w);
  112. {
  113. GLshort buf[4];
  114. buf[0] = (GLshort)x;
  115. buf[1] = (GLshort)y;
  116. buf[2] = (GLshort)z;
  117. buf[3] = (GLshort)w;
  118. glVertex4sv(buf);
  119. }
  120. glVertex4i((GLint)x, (GLint)y, (GLint)z, (GLint)w);
  121. {
  122. GLint buf[4];
  123. buf[0] = (GLint)x;
  124. buf[1] = (GLint)y;
  125. buf[2] = (GLint)z;
  126. buf[3] = (GLint)w;
  127. glVertex4iv(buf);
  128. }
  129. glVertex4f((GLfloat)x, (GLfloat)y, (GLfloat)z, (GLfloat)w);
  130. {
  131. GLfloat buf[4];
  132. buf[0] = (GLfloat)x;
  133. buf[1] = (GLfloat)y;
  134. buf[2] = (GLfloat)z;
  135. buf[3] = (GLfloat)w;
  136. glVertex4fv(buf);
  137. }
  138. glVertex4d((GLdouble)x, (GLdouble)y, (GLdouble)z, (GLdouble)w);
  139. {
  140. GLdouble buf[4];
  141. buf[0] = (GLdouble)x;
  142. buf[1] = (GLdouble)y;
  143. buf[2] = (GLdouble)z;
  144. buf[3] = (GLdouble)w;
  145. glVertex4dv(buf);
  146. }
  147. Output("\n");
  148. }
  149. void CallViewport(void)
  150. {
  151. Output("glViewport\n");
  152. glViewport(0, 0, WINSIZE, WINSIZE);
  153. Output("\n");
  154. }