Team Fortress 2 Source Code as on 22/4/2020
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.

123 lines
4.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. // TOGL CODE LICENSE
  3. //
  4. // Copyright 2011-2014 Valve Corporation
  5. // All Rights Reserved.
  6. //
  7. // Permission is hereby granted, free of charge, to any person obtaining a copy
  8. // of this software and associated documentation files (the "Software"), to deal
  9. // in the Software without restriction, including without limitation the rights
  10. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the Software is
  12. // furnished to do so, subject to the following conditions:
  13. //
  14. // The above copyright notice and this permission notice shall be included in
  15. // all copies or substantial portions of the Software.
  16. //
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  23. // THE SOFTWARE.
  24. //
  25. // glmgrext.h
  26. // helper file for extension testing and runtime importing of entry points
  27. //
  28. //===============================================================================
  29. #pragma once
  30. #ifdef OSX
  31. #include <OpenGL/gl.h>
  32. #include <OpenGL/glext.h>
  33. #elif defined(DX_TO_GL_ABSTRACTION)
  34. #include <GL/gl.h>
  35. #include <GL/glext.h>
  36. #else
  37. #error
  38. #endif
  39. #ifndef GL_EXT_framebuffer_sRGB
  40. #define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9
  41. #define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA
  42. #endif
  43. #ifndef ARB_texture_rg
  44. #define GL_COMPRESSED_RED 0x8225
  45. #define GL_COMPRESSED_RG 0x8226
  46. #define GL_RG 0x8227
  47. #define GL_RG_INTEGER 0x8228
  48. #define GL_R8 0x8229
  49. #define GL_R16 0x822A
  50. #define GL_RG8 0x822B
  51. #define GL_RG16 0x822C
  52. #define GL_R16F 0x822D
  53. #define GL_R32F 0x822E
  54. #define GL_RG16F 0x822F
  55. #define GL_RG32F 0x8230
  56. #define GL_R8I 0x8231
  57. #define GL_R8UI 0x8232
  58. #define GL_R16I 0x8233
  59. #define GL_R16UI 0x8234
  60. #define GL_R32I 0x8235
  61. #define GL_R32UI 0x8236
  62. #define GL_RG8I 0x8237
  63. #define GL_RG8UI 0x8238
  64. #define GL_RG16I 0x8239
  65. #define GL_RG16UI 0x823A
  66. #define GL_RG32I 0x823B
  67. #define GL_RG32UI 0x823C
  68. #endif
  69. #ifndef GL_EXT_bindable_uniform
  70. #define GL_UNIFORM_BUFFER_EXT 0x8DEE
  71. #endif
  72. // unpublished extension enums (thus the "X")
  73. // from EXT_framebuffer_multisample_blit_scaled..
  74. #define XGL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
  75. #define XGL_SCALED_RESOLVE_NICEST_EXT 0x90BB
  76. #ifndef GL_TEXTURE_MINIMIZE_STORAGE_APPLE
  77. #define GL_TEXTURE_MINIMIZE_STORAGE_APPLE 0x85B6
  78. #endif
  79. #ifndef GL_ALL_COMPLETED_NV
  80. #define GL_ALL_COMPLETED_NV 0x84F2
  81. #endif
  82. #ifndef GL_MAP_READ_BIT
  83. #define GL_MAP_READ_BIT 0x0001
  84. #endif
  85. #ifndef GL_MAP_WRITE_BIT
  86. #define GL_MAP_WRITE_BIT 0x0002
  87. #endif
  88. #ifndef GL_MAP_INVALIDATE_RANGE_BIT
  89. #define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
  90. #endif
  91. #ifndef GL_MAP_INVALIDATE_BUFFER_BIT
  92. #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
  93. #endif
  94. #ifndef GL_MAP_FLUSH_EXPLICIT_BIT
  95. #define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
  96. #endif
  97. #ifndef GL_MAP_UNSYNCHRONIZED_BIT
  98. #define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
  99. #endif
  100. #ifndef GL_MAP_PERSISTENT_BIT
  101. #define GL_MAP_PERSISTENT_BIT 0x0040
  102. #endif
  103. #ifndef GL_MAP_COHERENT_BIT
  104. #define GL_MAP_COHERENT_BIT 0x0080
  105. #endif