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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. #include <sys/types.h>
  38. #define GL_CORE_SGI 1
  39. #define GL_CORE_MESA 2
  40. #define GL_CORE_APPLE 4
  41. #define GL_CORE_WINDOWS 8
  42. typedef struct __GLcontextRec __GLcontext;
  43. /*
  44. ** This file defines the interface between the GL core and the surrounding
  45. ** "operating system" that supports it (currently the GLX or WGL extensions).
  46. **
  47. ** Members (data and function pointers) are documented as imported or
  48. ** exported according to how they are used by the core rendering functions.
  49. ** Imported members are initialized by the "operating system" and used by
  50. ** the core functions. Exported members are initialized by the core functions
  51. ** and used by the "operating system".
  52. */
  53. /**
  54. * Mode and limit information for a context. This information is
  55. * kept around in the context so that values can be used during
  56. * command execution, and for returning information about the
  57. * context to the application.
  58. *
  59. * Instances of this structure are shared by the driver and the loader. To
  60. * maintain binary compatability, new fields \b must be added only to the
  61. * end of the structure.
  62. *
  63. * \sa _gl_context_modes_create
  64. */
  65. typedef struct __GLcontextModesRec {
  66. struct __GLcontextModesRec * next;
  67. GLboolean rgbMode;
  68. GLboolean floatMode;
  69. GLboolean colorIndexMode;
  70. GLuint doubleBufferMode;
  71. GLuint stereoMode;
  72. GLboolean haveAccumBuffer;
  73. GLboolean haveDepthBuffer;
  74. GLboolean haveStencilBuffer;
  75. GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
  76. GLuint redMask, greenMask, blueMask, alphaMask;
  77. GLint rgbBits; /* total bits for rgb */
  78. GLint indexBits; /* total bits for colorindex */
  79. GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
  80. GLint depthBits;
  81. GLint stencilBits;
  82. GLint numAuxBuffers;
  83. GLint level;
  84. GLint pixmapMode;
  85. /* GLX */
  86. GLint visualID;
  87. GLint visualType; /**< One of the GLX X visual types. (i.e.,
  88. * \c GLX_TRUE_COLOR, etc.)
  89. */
  90. /* EXT_visual_rating / GLX 1.2 */
  91. GLint visualRating;
  92. /* EXT_visual_info / GLX 1.2 */
  93. GLint transparentPixel;
  94. /* colors are floats scaled to ints */
  95. GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
  96. GLint transparentIndex;
  97. /* ARB_multisample / SGIS_multisample */
  98. GLint sampleBuffers;
  99. GLint samples;
  100. /* SGIX_fbconfig / GLX 1.3 */
  101. GLint drawableType;
  102. GLint renderType;
  103. GLint xRenderable;
  104. GLint fbconfigID;
  105. /* SGIX_pbuffer / GLX 1.3 */
  106. GLint maxPbufferWidth;
  107. GLint maxPbufferHeight;
  108. GLint maxPbufferPixels;
  109. GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
  110. GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
  111. /* SGIX_visual_select_group */
  112. GLint visualSelectGroup;
  113. /* OML_swap_method */
  114. GLint swapMethod;
  115. GLint screen;
  116. /* EXT_texture_from_pixmap */
  117. GLint bindToTextureRgb;
  118. GLint bindToTextureRgba;
  119. GLint bindToMipmapTexture;
  120. GLint bindToTextureTargets;
  121. GLint yInverted;
  122. } __GLcontextModes;
  123. /* Several fields of __GLcontextModes can take these as values. Since
  124. * GLX header files may not be available everywhere they need to be used,
  125. * redefine them here.
  126. */
  127. #define GLX_NONE 0x8000
  128. #define GLX_SLOW_CONFIG 0x8001
  129. #define GLX_TRUE_COLOR 0x8002
  130. #define GLX_DIRECT_COLOR 0x8003
  131. #define GLX_PSEUDO_COLOR 0x8004
  132. #define GLX_STATIC_COLOR 0x8005
  133. #define GLX_GRAY_SCALE 0x8006
  134. #define GLX_STATIC_GRAY 0x8007
  135. #define GLX_TRANSPARENT_RGB 0x8008
  136. #define GLX_TRANSPARENT_INDEX 0x8009
  137. #define GLX_NON_CONFORMANT_CONFIG 0x800D
  138. #define GLX_SWAP_EXCHANGE_OML 0x8061
  139. #define GLX_SWAP_COPY_OML 0x8062
  140. #define GLX_SWAP_UNDEFINED_OML 0x8063
  141. #define GLX_DONT_CARE 0xFFFFFFFF
  142. #define GLX_RGBA_BIT 0x00000001
  143. #define GLX_COLOR_INDEX_BIT 0x00000002
  144. #define GLX_WINDOW_BIT 0x00000001
  145. #define GLX_PIXMAP_BIT 0x00000002
  146. #define GLX_PBUFFER_BIT 0x00000004
  147. #define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
  148. #define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
  149. #define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
  150. #define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
  151. #define GLX_Y_INVERTED_EXT 0x20D4
  152. #define GLX_TEXTURE_1D_BIT_EXT 0x00000001
  153. #define GLX_TEXTURE_2D_BIT_EXT 0x00000002
  154. #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
  155. #endif /* __gl_core_h_ */