Source code of Windows XP (NT5)
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.

217 lines
5.8 KiB

  1. /*
  2. ** Copyright 1995-2095, 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 "glslib.h"
  18. /******************************************************************************
  19. Global data
  20. ******************************************************************************/
  21. const GLSenum __glsAllAPIs[__GLS_API_COUNT + 1] = {
  22. GLS_API_GLS,
  23. GLS_API_GL,
  24. GLS_NONE,
  25. };
  26. const GLubyte *const __glsExtensions = (const GLubyte *)(
  27. ""
  28. #if __GL_EXT_abgr
  29. "GL_EXT_abgr "
  30. #endif /* __GL_EXT_abgr */
  31. #if __GL_EXT_blend_color
  32. "GL_EXT_blend_color "
  33. #endif /* __GL_EXT_blend_color */
  34. #if __GL_EXT_blend_logic_op
  35. "GL_EXT_blend_logic_op "
  36. #endif /* __GL_EXT_blend_logic_op */
  37. #if __GL_EXT_blend_minmax
  38. "GL_EXT_blend_minmax "
  39. #endif /* __GL_EXT_blend_minmax */
  40. #if __GL_EXT_blend_subtract
  41. "GL_EXT_blend_subtract "
  42. #endif /* __GL_EXT_blend_subtract */
  43. #if __GL_EXT_cmyka
  44. "GL_EXT_cmyka "
  45. #endif /* __GL_EXT_cmyka */
  46. #if __GL_EXT_convolution
  47. "GL_EXT_convolution "
  48. #endif /* __GL_EXT_convolution */
  49. #if __GL_EXT_copy_texture
  50. "GL_EXT_copy_texture "
  51. #endif /* __GL_EXT_copy_texture */
  52. #if __GL_EXT_histogram
  53. "GL_EXT_histogram "
  54. #endif /* __GL_EXT_histogram */
  55. #if __GL_EXT_packed_pixels
  56. "GL_EXT_packed_pixels "
  57. #endif /* __GL_EXT_packed_pixels */
  58. #if __GL_EXT_polygon_offset
  59. "GL_EXT_polygon_offset "
  60. #endif /* __GL_EXT_polygon_offset */
  61. #if __GL_EXT_rescale_normal
  62. "GL_EXT_rescale_normal "
  63. #endif /* __GL_EXT_rescale_normal */
  64. #if __GL_EXT_subtexture
  65. "GL_EXT_subtexture "
  66. #endif /* __GL_EXT_subtexture */
  67. #if __GL_EXT_texture
  68. "GL_EXT_texture "
  69. #endif /* __GL_EXT_texture */
  70. #if __GL_EXT_texture_object
  71. "GL_EXT_texture_object "
  72. #endif /* __GL_EXT_texture_object */
  73. #if __GL_EXT_texture3D
  74. "GL_EXT_texture3D "
  75. #endif /* __GL_EXT_texture3D */
  76. #if __GL_EXT_vertex_array
  77. "GL_EXT_vertex_array "
  78. #endif /* __GL_EXT_vertex_array */
  79. #if __GL_SGI_color_matrix
  80. "GL_SGI_color_matrix "
  81. #endif /* __GL_SGI_color_matrix */
  82. #if __GL_SGI_color_table
  83. "GL_SGI_color_table "
  84. #endif /* __GL_SGI_color_table */
  85. #if __GL_SGI_texture_color_table
  86. "GL_SGI_texture_color_table "
  87. #endif /* __GL_SGI_texture_color_table */
  88. #if __GL_SGIS_component_select
  89. "GL_SGIS_component_select "
  90. #endif /* __GL_SGIS_component_select */
  91. #if __GL_SGIS_detail_texture
  92. "GL_SGIS_detail_texture "
  93. #endif /* __GL_SGIS_detail_texture */
  94. #if __GL_SGIS_multisample
  95. "GL_SGIS_multisample "
  96. #endif /* __GL_SGIS_multisample */
  97. #if __GL_SGIS_sharpen_texture
  98. "GL_SGIS_sharpen_texture "
  99. #endif /* __GL_SGIS_sharpen_texture */
  100. #if __GL_SGIS_texture_border_clamp
  101. "GL_SGIS_texture_border_clamp "
  102. #endif /* __GL_SGIS_texture_border_clamp */
  103. #if __GL_SGIS_texture_edge_clamp
  104. "GL_SGIS_texture_edge_clamp "
  105. #endif /* __GL_SGIS_texture_edge_clamp */
  106. #if __GL_SGIS_texture_filter4
  107. "GL_SGIS_texture_filter4 "
  108. #endif /* __GL_SGIS_texture_filter4 */
  109. #if __GL_SGIS_texture_lod
  110. "GL_SGIS_texture_lod "
  111. #endif /* __GL_SGIS_texture_lod */
  112. #if __GL_SGIS_texture4D
  113. "GL_SGIS_texture4D "
  114. #endif /* __GL_SGIS_texture4D */
  115. #if __GL_SGIX_interlace
  116. "GL_SGIX_interlace "
  117. #endif /* __GL_SGIX_interlace */
  118. #if __GL_SGIX_multipass
  119. "GL_SGIX_multipass "
  120. #endif /* __GL_SGIX_multipass */
  121. #if __GL_SGIX_multisample
  122. "GL_SGIX_multisample "
  123. #endif /* __GL_SGIX_multisample */
  124. #if __GL_SGIX_pixel_texture
  125. "GL_SGIX_pixel_texture "
  126. #endif /* __GL_SGIX_pixel_texture */
  127. #if __GL_SGIX_pixel_tiles
  128. "GL_SGIX_pixel_tiles "
  129. #endif /* __GL_SGIX_pixel_tiles */
  130. #if __GL_SGIX_sprite
  131. "GL_SGIX_sprite "
  132. #endif /* __GL_SGIX_sprite */
  133. #if __GL_SGIX_texture_multi_buffer
  134. "GL_SGIX_texture_multi_buffer "
  135. #endif /* __GL_SGIX_texture_multi_buffer */
  136. );
  137. __GLSdict *__glsContextDict = GLS_NONE;
  138. __GLScontextList __glsContextList = {GLS_NONE};
  139. __GLSparser *__glsParser = GLS_NONE;
  140. /******************************************************************************
  141. Global functions
  142. ******************************************************************************/
  143. #ifndef __GLS_PLATFORM_WIN32
  144. // DrewB
  145. void __glsCallError(GLSopcode inOpcode, GLSenum inError) {
  146. typedef void (*__GLSdispatch)(GLSopcode, GLSenum);
  147. ((__GLSdispatch)__GLS_CONTEXT->dispatchCall[GLS_OP_glsError])(
  148. inOpcode, inError
  149. );
  150. }
  151. void __glsCallUnsupportedCommand(void) {
  152. typedef void (*__GLSdispatch)(void);
  153. ((__GLSdispatch)__GLS_CONTEXT->dispatchCall[GLS_OP_glsUnsupportedCommand])(
  154. );
  155. }
  156. #else
  157. void __glsCallError(__GLScontext *ctx, GLSopcode inOpcode, GLSenum inError) {
  158. typedef void (*__GLSdispatch)(GLSopcode, GLSenum);
  159. ((__GLSdispatch)ctx->dispatchCall[GLS_OP_glsError])(
  160. inOpcode, inError
  161. );
  162. }
  163. void __glsCallUnsupportedCommand(__GLScontext *ctx) {
  164. typedef void (*__GLSdispatch)(void);
  165. ((__GLSdispatch)ctx->dispatchCall[GLS_OP_glsUnsupportedCommand])(
  166. );
  167. }
  168. #endif