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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. #ifndef __gl_core_h_
  2. #define __gl_core_h_
  3. /*
  4. * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
  5. * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice including the dates of first publication and
  15. * either this permission notice or a reference to
  16. * http://oss.sgi.com/projects/FreeB/
  17. * shall be included in all copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  20. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  22. * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  23. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
  24. * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  25. * SOFTWARE.
  26. *
  27. * Except as contained in this notice, the name of Silicon Graphics, Inc.
  28. * shall not be used in advertising or otherwise to promote the sale, use or
  29. * other dealings in this Software without prior written authorization from
  30. * Silicon Graphics, Inc.
  31. */
  32. #if !defined(_WIN32_WCE)
  33. #include <sys/types.h>
  34. #endif
  35. #define GL_CORE_SGI 1
  36. #define GL_CORE_MESA 2
  37. #define GL_CORE_APPLE 4
  38. #define GL_CORE_WINDOWS 8
  39. typedef struct __GLcontextRec __GLcontext;
  40. /*
  41. ** This file defines the interface between the GL core and the surrounding
  42. ** "operating system" that supports it (currently the GLX or WGL extensions).
  43. **
  44. ** Members (data and function pointers) are documented as imported or
  45. ** exported according to how they are used by the core rendering functions.
  46. ** Imported members are initialized by the "operating system" and used by
  47. ** the core functions. Exported members are initialized by the core functions
  48. ** and used by the "operating system".
  49. */
  50. /**
  51. * Mode and limit information for a context. This information is
  52. * kept around in the context so that values can be used during
  53. * command execution, and for returning information about the
  54. * context to the application.
  55. *
  56. * Instances of this structure are shared by the driver and the loader. To
  57. * maintain binary compatability, new fields \b must be added only to the
  58. * end of the structure.
  59. *
  60. * \sa _gl_context_modes_create
  61. */
  62. typedef struct __GLcontextModesRec {
  63. struct __GLcontextModesRec * next;
  64. GLboolean rgbMode;
  65. GLboolean floatMode;
  66. GLboolean colorIndexMode;
  67. GLuint doubleBufferMode;
  68. GLuint stereoMode;
  69. GLboolean haveAccumBuffer;
  70. GLboolean haveDepthBuffer;
  71. GLboolean haveStencilBuffer;
  72. GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
  73. GLuint redMask, greenMask, blueMask, alphaMask;
  74. GLint rgbBits; /* total bits for rgb */
  75. GLint indexBits; /* total bits for colorindex */
  76. GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
  77. GLint depthBits;
  78. GLint stencilBits;
  79. GLint numAuxBuffers;
  80. GLint level;
  81. GLint pixmapMode;
  82. /* GLX */
  83. GLint visualID;
  84. GLint visualType; /**< One of the GLX X visual types. (i.e.,
  85. * \c GLX_TRUE_COLOR, etc.)
  86. */
  87. /* EXT_visual_rating / GLX 1.2 */
  88. GLint visualRating;
  89. /* EXT_visual_info / GLX 1.2 */
  90. GLint transparentPixel;
  91. /* colors are floats scaled to ints */
  92. GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
  93. GLint transparentIndex;
  94. /* ARB_multisample / SGIS_multisample */
  95. GLint sampleBuffers;
  96. GLint samples;
  97. /* SGIX_fbconfig / GLX 1.3 */
  98. GLint drawableType;
  99. GLint renderType;
  100. GLint xRenderable;
  101. GLint fbconfigID;
  102. /* SGIX_pbuffer / GLX 1.3 */
  103. GLint maxPbufferWidth;
  104. GLint maxPbufferHeight;
  105. GLint maxPbufferPixels;
  106. GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
  107. GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
  108. /* SGIX_visual_select_group */
  109. GLint visualSelectGroup;
  110. /* OML_swap_method */
  111. GLint swapMethod;
  112. GLint screen;
  113. /* EXT_texture_from_pixmap */
  114. GLint bindToTextureRgb;
  115. GLint bindToTextureRgba;
  116. GLint bindToMipmapTexture;
  117. GLint bindToTextureTargets;
  118. GLint yInverted;
  119. } __GLcontextModes;
  120. /* Several fields of __GLcontextModes can take these as values. Since
  121. * GLX header files may not be available everywhere they need to be used,
  122. * redefine them here.
  123. */
  124. #define GLX_NONE 0x8000
  125. #define GLX_SLOW_CONFIG 0x8001
  126. #define GLX_TRUE_COLOR 0x8002
  127. #define GLX_DIRECT_COLOR 0x8003
  128. #define GLX_PSEUDO_COLOR 0x8004
  129. #define GLX_STATIC_COLOR 0x8005
  130. #define GLX_GRAY_SCALE 0x8006
  131. #define GLX_STATIC_GRAY 0x8007
  132. #define GLX_TRANSPARENT_RGB 0x8008
  133. #define GLX_TRANSPARENT_INDEX 0x8009
  134. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  135. #define GLX_SWAP_EXCHANGE_OML 0x8061
  136. #define GLX_SWAP_COPY_OML 0x8062
  137. #define GLX_SWAP_UNDEFINED_OML 0x8063
  138. #define GLX_DONT_CARE 0xFFFFFFFF
  139. #define GLX_RGBA_BIT 0x00000001
  140. #define GLX_COLOR_INDEX_BIT 0x00000002
  141. #define GLX_WINDOW_BIT 0x00000001
  142. #define GLX_PIXMAP_BIT 0x00000002
  143. #define GLX_PBUFFER_BIT 0x00000004
  144. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
  145. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
  146. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
  147. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
  148. #define GLX_Y_INVERTED_EXT 0x20D4
  149. #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
  150. #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
  151. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
  152. #endif /* __gl_core_h_ */