CGLDEF.H 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. #ifndef __CGL_DEF__
  2. #define __CGL_DEF__
  3. /*********************************************************************
  4. cgldef.h
  5. Copyright (c) Creative Technology Ltd. 1994-1995. All Rights Reserved.
  6. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  7. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  8. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  9. PURPOSE.
  10. *********************************************************************/
  11. /*
  12. * @@ SOURCE DOCUMENTATION
  13. *
  14. * TITLE : cgldef.h
  15. *
  16. * VERSION : 0.01
  17. *
  18. * DATE : 1 December 1994
  19. *
  20. * AUTHOR : Philip Teo
  21. * Toh Chin Kok
  22. * Burak Alp
  23. *
  24. * BRIEF : This file includes all constants and marco used.
  25. *
  26. * @@ LOG CHANGE
  27. * DATE VERSION REV DESCRIPTION
  28. * 13 Feb 95 1.0 Philip Teo First library version
  29. * 11 Mar 95 1.1 Philip Teo Second library version
  30. */
  31. //====================//
  32. // CGL_SendStream //
  33. //====================//
  34. ////////////////////////
  35. // Stream Handling //
  36. ////////////////////////
  37. /////////////////////
  38. // Operation Type //
  39. /////////////////////
  40. #define CGL_RENDER 1
  41. #define CGL_COPY 2
  42. //////////////////////
  43. // Primitive Types //
  44. //////////////////////
  45. #define CGL_POINT (CGL_INT16) 0x0000
  46. #define CGL_LINE (CGL_INT16) 0x0100
  47. #define CGL_LINE_STRIP (CGL_INT16) 0x0101
  48. #define CGL_LINE_LOOP (CGL_INT16) 0x0102
  49. #define CGL_TRIANGLE (CGL_INT16) 0x0200
  50. #define CGL_TRIANGLE_STRIP (CGL_INT16) 0x0201
  51. #define CGL_TRIANGLE_FAN (CGL_INT16) 0x0202
  52. #define CGL_QUAD (CGL_INT16) 0x0300
  53. #define CGL_QUAD_STRIP (CGL_INT16) 0x0301
  54. #define CGL_RECTANGLE (CGL_INT16) 0x0400
  55. #define CGL_SPAN_LINE (CGL_INT16) 0x0501
  56. #define CGL_SPAN_VLINE (CGL_INT16) 0x0502
  57. /////////////////////////
  58. // Primitive Property //
  59. /////////////////////////
  60. //////////////////
  61. // Shading //
  62. //////////////////
  63. #define CGL_GOURAUD 1
  64. #define CGL_FLAT 0
  65. //////////////////////////
  66. // Stencil Read/Write //
  67. /////////////////////////
  68. #define CGL_WRITE_ENABLE 1
  69. #define CGL_READ_ENABLE 2
  70. //===================//
  71. // CGL_InitScreen //
  72. //===================//
  73. ///////////////////////
  74. // Screen Reference //
  75. ///////////////////////
  76. #define CGL_TOP_LEFT 0
  77. #define CGL_BOTTOM_LEFT 1
  78. ///////////////////////
  79. // Screen Mode //
  80. ///////////////////////
  81. // multisync monitor required
  82. #define CGL_M320x200x70Hz 0
  83. #define CGL_M320x240x60Hz 1
  84. #define CGL_M640x480x75Hz 2
  85. #define CGL_M800x600x75Hz 3
  86. #define CGL_M1024x768x75Hz 4
  87. #define CGL_M1280x1024x75Hz 5
  88. // standard SVGA range
  89. #define CGL_M640x480x72Hz 6
  90. #define CGL_M800x600x56Hz 7
  91. #define CGL_M800x600x60Hz 8
  92. #define CGL_M800x600x72Hz 9
  93. #define CGL_M1024x768x60Hz 10
  94. #define CGL_M1280x1024x57Hz 11
  95. // standard VGA range
  96. #define CGL_M640x480x60Hz 13
  97. #define CGL_M640x400x70Hz 14
  98. #define CGL_M640x350x70Hz 15
  99. ///////////////////////
  100. // Color Order //
  101. ///////////////////////
  102. #define CGL_RGB_MODE 1
  103. #define CGL_BGR_MODE 0
  104. ///////////////////////
  105. // Color Format //
  106. ///////////////////////
  107. #define CGL_CI8 14
  108. #define CGL_RGB232 11
  109. #define CGL_RGB2321 9
  110. #define CGL_RGB332 5
  111. #define CGL_RGB4444 2
  112. #define CGL_RGB5551 1
  113. #define CGL_RGB8888 0
  114. /////////////////////////////
  115. // Single/Double Buffering //
  116. /////////////////////////////
  117. #define CGL_SINGLE 1
  118. #define CGL_DOUBLE 2
  119. /////////////////////////////
  120. // Stencil/Depth //
  121. /////////////////////////////
  122. #define CGL_D0S0 0
  123. #define CGL_D16S0 1
  124. #define CGL_D15S1 2
  125. //===================================//
  126. // cglSetDepthMode/cglSetStencilMode //
  127. //===================================//
  128. /////////////////////////////
  129. // Depth/Stencil Test //
  130. /////////////////////////////
  131. #define CGL_NEVER 0
  132. #define CGL_LESS 1
  133. #define CGL_EQUAL 2
  134. #define CGL_LESS_OR_EQUAL 3
  135. #define CGL_GREATER 4
  136. #define CGL_NOT_EQUAL 5
  137. #define CGL_GREATER_OR_EQUAL 6
  138. #define CGL_ALWAYS 7
  139. #define CGL_KEEP 0
  140. #define CGL_RESET 1
  141. #define CGL_REPLACE 2
  142. #define CGL_INVERT 5
  143. ///////////////////////
  144. // Buffer Type/Mask //
  145. ///////////////////////
  146. #define CGL_FRAME_BUFFER 0x10
  147. #define CGL_DEPTH_BUFFER 0x08
  148. #define CGL_STENCIL_BUFFER 0x04
  149. ////////////////////////
  150. // Buffer Operation //
  151. ////////////////////////
  152. #define CGL_FRONT_TO_BACK 1
  153. #define CGL_BACK_TO_FRONT 2
  154. #define CGL_FRONT_BUFFER 1
  155. #define CGL_BACK_BUFFER 2
  156. #define CGL_LOCAL_BUFFER 3
  157. #define CGL_TEXTURE_BUFFER 4
  158. ///////////////////////////
  159. // Logical Operation //
  160. ///////////////////////////
  161. #define CGL_LOGICOP_CLEAR 0
  162. #define CGL_LOGICOP_AND 1
  163. #define CGL_LOGICOP_AND_NOT 2
  164. #define CGL_LOGICOP_COPY 3
  165. #define CGL_LOGICOP_NOT_AND 4
  166. #define CGL_LOGICOP_NOP 5
  167. #define CGL_LOGICOP_XOR 6
  168. #define CGL_LOGICOP_OR 7
  169. #define CGL_LOGICOP_NOR 8
  170. #define CGL_LOGICOP_NOT_XOR 9
  171. #define CGL_LOGICOP_INVERT 10
  172. #define CGL_LOGICOP_OR_NOT 11
  173. #define CGL_LOGICOP_NOT 12
  174. #define CGL_LOGICOP_NOT_OR 13
  175. #define CGL_LOGICOP_NAND 14
  176. #define CGL_LOGICOP_SET 15
  177. #define CGL_NO_BLEND 90
  178. #define CGL_BLEND_IMAGE 91
  179. #define CGL_BLEND_PIXEL 92
  180. //===========================//
  181. // CGL_SetTextureFilter //
  182. //===========================//
  183. #define CGL_TEXTURE_DISABLE_FILTER 0
  184. #define CGL_TEXTURE_FILTER_TYPE_1 1
  185. #define CGL_TEXTURE_FILTER_TYPE_2 2
  186. #define CGL_TEXTURE_FILTER_TYPE_3 3
  187. #define CGL_TEXTURE_FILTER_TYPE_4 4
  188. #define CGL_TEXTURE_FILTER_TYPE_5 5
  189. #define CGL_MODULATE_TEXTURE 0
  190. #define CGL_DECAL_TEXTURE 1
  191. #define CGL_COPY_TEXTURE 3
  192. #define CGL_TEXTURE_CLAMP 0
  193. #define CGL_TEXTURE_REPEAT 1
  194. #define CGL_TEXTURE_MIRROR 2
  195. //===========================//
  196. // CGL_SetPickRegion //
  197. // CGL_SetExtentRegion //
  198. //===========================//
  199. ///////////////////////////////
  200. // Query Control Parameters //
  201. ///////////////////////////////
  202. #define CGL_INSIDE_REGION 0x0
  203. #define CGL_OUTSIDE_REGION 0x1
  204. #define CGL_EXCLUDE_CULL_PIXEL 0x0
  205. #define CGL_INCLUDE_CULL_PIXEL 0x2
  206. #define CGL_EXCLUDE_DRAWN_PIXEL 0x4
  207. #define CGL_INCLUDE_DRAWN_PIXEL 0x0
  208. #define CGL_EAGLE1_REV01 0x0001
  209. #define CGL_EAGLE1_REV02 0x0002
  210. #define CGL_GLINT300SX_REV01 0x0100
  211. #define CGL_GLINT300SX_REV02 0x0200
  212. // Cursor (CGL_DISABLE for disable cursor)
  213. #define CGL_32x32x3 0x01
  214. #define CGL_32x32x2HL 0x02
  215. #define CGL_32x32x2 0x03
  216. #define CGL_64x64x3 0x05
  217. #define CGL_64x64x2HL 0x06
  218. #define CGL_64x64x2 0x07
  219. //////////////////////////////
  220. // MISCELLANEOUS //
  221. //////////////////////////////
  222. #define CGL_ENABLE 1
  223. #define CGL_DISABLE 0
  224. //-- Interrupt
  225. #define CGL_INTR_VRETRACE 0x0001
  226. #define CGL_INTR_SCANLINE 0x0002
  227. #define CGL_INTR_SWAPBUFFER 0x0100
  228. #endif // __CGL_DEF__