Clone of mesa.
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.

glcore.h 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. #ifndef __gl_core_h_
  2. #define __gl_core_h_
  3. /*
  4. ** License Applicability. Except to the extent portions of this file are
  5. ** made subject to an alternative license as permitted in the SGI Free
  6. ** Software License B, Version 1.1 (the "License"), the contents of this
  7. ** file are subject only to the provisions of the License. You may not use
  8. ** this file except in compliance with the License. You may obtain a copy
  9. ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
  10. ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
  11. **
  12. ** http://oss.sgi.com/projects/FreeB
  13. **
  14. ** Note that, as provided in the License, the Software is distributed on an
  15. ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
  16. ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
  17. ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
  18. ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
  19. **
  20. ** Original Code. The Original Code is: OpenGL Sample Implementation,
  21. ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
  22. ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
  23. ** Copyright in any portions created by third parties is as indicated
  24. ** elsewhere herein. All Rights Reserved.
  25. **
  26. ** Additional Notice Provisions: The application programming interfaces
  27. ** established by SGI in conjunction with the Original Code are The
  28. ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
  29. ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
  30. ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
  31. ** Window System(R) (Version 1.3), released October 19, 1998. This software
  32. ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
  33. ** published by SGI, but has not been independently verified as being
  34. ** compliant with the OpenGL(R) version 1.2.1 Specification.
  35. **
  36. */
  37. #if !defined(_WIN32_WCE)
  38. #include <sys/types.h>
  39. #endif
  40. #define GL_CORE_SGI 1
  41. #define GL_CORE_MESA 2
  42. #define GL_CORE_APPLE 4
  43. typedef struct __GLcontextRec __GLcontext;
  44. /*
  45. ** This file defines the interface between the GL core and the surrounding
  46. ** "operating system" that supports it (currently the GLX or WGL extensions).
  47. **
  48. ** Members (data and function pointers) are documented as imported or
  49. ** exported according to how they are used by the core rendering functions.
  50. ** Imported members are initialized by the "operating system" and used by
  51. ** the core functions. Exported members are initialized by the core functions
  52. ** and used by the "operating system".
  53. */
  54. /**
  55. * Mode and limit information for a context. This information is
  56. * kept around in the context so that values can be used during
  57. * command execution, and for returning information about the
  58. * context to the application.
  59. *
  60. * Instances of this structure are shared by the driver and the loader. To
  61. * maintain binary compatability, new fields \b must be added only to the
  62. * end of the structure.
  63. *
  64. * \sa _gl_context_modes_create
  65. */
  66. typedef struct __GLcontextModesRec {
  67. struct __GLcontextModesRec * next;
  68. GLboolean rgbMode;
  69. GLboolean floatMode;
  70. GLboolean colorIndexMode;
  71. GLuint doubleBufferMode;
  72. GLuint stereoMode;
  73. GLboolean haveAccumBuffer;
  74. GLboolean haveDepthBuffer;
  75. GLboolean haveStencilBuffer;
  76. GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
  77. GLuint redMask, greenMask, blueMask, alphaMask;
  78. GLint rgbBits; /* total bits for rgb */
  79. GLint indexBits; /* total bits for colorindex */
  80. GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
  81. GLint depthBits;
  82. GLint stencilBits;
  83. GLint numAuxBuffers;
  84. GLint level;
  85. GLint pixmapMode;
  86. /* GLX */
  87. GLint visualID;
  88. GLint visualType; /**< One of the GLX X visual types. (i.e.,
  89. * \c GLX_TRUE_COLOR, etc.)
  90. */
  91. /* EXT_visual_rating / GLX 1.2 */
  92. GLint visualRating;
  93. /* EXT_visual_info / GLX 1.2 */
  94. GLint transparentPixel;
  95. /* colors are floats scaled to ints */
  96. GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
  97. GLint transparentIndex;
  98. /* ARB_multisample / SGIS_multisample */
  99. GLint sampleBuffers;
  100. GLint samples;
  101. /* SGIX_fbconfig / GLX 1.3 */
  102. GLint drawableType;
  103. GLint renderType;
  104. GLint xRenderable;
  105. GLint fbconfigID;
  106. /* SGIX_pbuffer / GLX 1.3 */
  107. GLint maxPbufferWidth;
  108. GLint maxPbufferHeight;
  109. GLint maxPbufferPixels;
  110. GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
  111. GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
  112. /* SGIX_visual_select_group */
  113. GLint visualSelectGroup;
  114. /* OML_swap_method */
  115. GLint swapMethod;
  116. GLint screen;
  117. /* EXT_texture_from_pixmap */
  118. GLint bindToTextureRgb;
  119. GLint bindToTextureRgba;
  120. GLint bindToMipmapTexture;
  121. GLint bindToTextureTargets;
  122. GLint yInverted;
  123. } __GLcontextModes;
  124. /* Several fields of __GLcontextModes can take these as values. Since
  125. * GLX header files may not be available everywhere they need to be used,
  126. * redefine them here.
  127. */
  128. #define GLX_NONE 0x8000
  129. #define GLX_SLOW_CONFIG 0x8001
  130. #define GLX_TRUE_COLOR 0x8002
  131. #define GLX_DIRECT_COLOR 0x8003
  132. #define GLX_PSEUDO_COLOR 0x8004
  133. #define GLX_STATIC_COLOR 0x8005
  134. #define GLX_GRAY_SCALE 0x8006
  135. #define GLX_STATIC_GRAY 0x8007
  136. #define GLX_TRANSPARENT_RGB 0x8008
  137. #define GLX_TRANSPARENT_INDEX 0x8009
  138. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  139. #define GLX_SWAP_EXCHANGE_OML 0x8061
  140. #define GLX_SWAP_COPY_OML 0x8062
  141. #define GLX_SWAP_UNDEFINED_OML 0x8063
  142. #define GLX_DONT_CARE 0xFFFFFFFF
  143. #define GLX_RGBA_BIT 0x00000001
  144. #define GLX_COLOR_INDEX_BIT 0x00000002
  145. #define GLX_WINDOW_BIT 0x00000001
  146. #define GLX_PIXMAP_BIT 0x00000002
  147. #define GLX_PBUFFER_BIT 0x00000004
  148. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
  149. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
  150. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
  151. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
  152. #define GLX_Y_INVERTED_EXT 0x20D4
  153. #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
  154. #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
  155. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
  156. #endif /* __gl_core_h_ */