wgl_obs.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #ifndef POINTER_C_GENERATED_HEADER_WINDOWSGL_H
  2. #define POINTER_C_GENERATED_HEADER_WINDOWSGL_H
  3. #ifdef __wglext_h_
  4. #error Attempt to include auto-generated WGL header after wglext.h
  5. #endif
  6. #define __wglext_h_
  7. #ifndef WIN32_LEAN_AND_MEAN
  8. #define WIN32_LEAN_AND_MEAN 1
  9. #endif
  10. #ifndef NOMINMAX
  11. #define NOMINMAX
  12. #endif
  13. #include <windows.h>
  14. #ifdef CODEGEN_FUNCPTR
  15. #undef CODEGEN_FUNCPTR
  16. #endif /*CODEGEN_FUNCPTR*/
  17. #define CODEGEN_FUNCPTR WINAPI
  18. #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
  19. #define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
  20. typedef unsigned int GLenum;
  21. typedef unsigned char GLboolean;
  22. typedef unsigned int GLbitfield;
  23. typedef signed char GLbyte;
  24. typedef short GLshort;
  25. typedef int GLint;
  26. typedef int GLsizei;
  27. typedef unsigned char GLubyte;
  28. typedef unsigned short GLushort;
  29. typedef unsigned int GLuint;
  30. typedef float GLfloat;
  31. typedef float GLclampf;
  32. typedef double GLdouble;
  33. typedef double GLclampd;
  34. #define GLvoid void
  35. #endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
  36. #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
  37. #define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
  38. #endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
  39. struct _GPU_DEVICE {
  40. DWORD cb;
  41. CHAR DeviceName[32];
  42. CHAR DeviceString[128];
  43. DWORD Flags;
  44. RECT rcVirtualScreen;
  45. };
  46. DECLARE_HANDLE(HPBUFFERARB);
  47. DECLARE_HANDLE(HPBUFFEREXT);
  48. DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
  49. DECLARE_HANDLE(HPVIDEODEV);
  50. DECLARE_HANDLE(HGPUNV);
  51. DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
  52. typedef struct _GPU_DEVICE *PGPU_DEVICE;
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif /*__cplusplus*/
  56. extern int wgl_ext_ARB_multisample;
  57. extern int wgl_ext_ARB_extensions_string;
  58. extern int wgl_ext_ARB_pixel_format;
  59. extern int wgl_ext_ARB_pixel_format_float;
  60. extern int wgl_ext_ARB_framebuffer_sRGB;
  61. extern int wgl_ext_ARB_create_context;
  62. extern int wgl_ext_ARB_create_context_profile;
  63. extern int wgl_ext_ARB_create_context_robustness;
  64. extern int wgl_ext_EXT_swap_control;
  65. extern int wgl_ext_EXT_pixel_format_packed_float;
  66. extern int wgl_ext_EXT_create_context_es2_profile;
  67. extern int wgl_ext_EXT_swap_control_tear;
  68. extern int wgl_ext_NV_swap_group;
  69. #define WGL_SAMPLES_ARB 0x2042
  70. #define WGL_SAMPLE_BUFFERS_ARB 0x2041
  71. #define WGL_ACCELERATION_ARB 0x2003
  72. #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
  73. #define WGL_ACCUM_BITS_ARB 0x201D
  74. #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
  75. #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
  76. #define WGL_ACCUM_RED_BITS_ARB 0x201E
  77. #define WGL_ALPHA_BITS_ARB 0x201B
  78. #define WGL_ALPHA_SHIFT_ARB 0x201C
  79. #define WGL_AUX_BUFFERS_ARB 0x2024
  80. #define WGL_BLUE_BITS_ARB 0x2019
  81. #define WGL_BLUE_SHIFT_ARB 0x201A
  82. #define WGL_COLOR_BITS_ARB 0x2014
  83. #define WGL_DEPTH_BITS_ARB 0x2022
  84. #define WGL_DOUBLE_BUFFER_ARB 0x2011
  85. #define WGL_DRAW_TO_BITMAP_ARB 0x2002
  86. #define WGL_DRAW_TO_WINDOW_ARB 0x2001
  87. #define WGL_FULL_ACCELERATION_ARB 0x2027
  88. #define WGL_GENERIC_ACCELERATION_ARB 0x2026
  89. #define WGL_GREEN_BITS_ARB 0x2017
  90. #define WGL_GREEN_SHIFT_ARB 0x2018
  91. #define WGL_NEED_PALETTE_ARB 0x2004
  92. #define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
  93. #define WGL_NO_ACCELERATION_ARB 0x2025
  94. #define WGL_NUMBER_OVERLAYS_ARB 0x2008
  95. #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
  96. #define WGL_NUMBER_UNDERLAYS_ARB 0x2009
  97. #define WGL_PIXEL_TYPE_ARB 0x2013
  98. #define WGL_RED_BITS_ARB 0x2015
  99. #define WGL_RED_SHIFT_ARB 0x2016
  100. #define WGL_SHARE_ACCUM_ARB 0x200E
  101. #define WGL_SHARE_DEPTH_ARB 0x200C
  102. #define WGL_SHARE_STENCIL_ARB 0x200D
  103. #define WGL_STENCIL_BITS_ARB 0x2023
  104. #define WGL_STEREO_ARB 0x2012
  105. #define WGL_SUPPORT_GDI_ARB 0x200F
  106. #define WGL_SUPPORT_OPENGL_ARB 0x2010
  107. #define WGL_SWAP_COPY_ARB 0x2029
  108. #define WGL_SWAP_EXCHANGE_ARB 0x2028
  109. #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
  110. #define WGL_SWAP_METHOD_ARB 0x2007
  111. #define WGL_SWAP_UNDEFINED_ARB 0x202A
  112. #define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
  113. #define WGL_TRANSPARENT_ARB 0x200A
  114. #define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
  115. #define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
  116. #define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
  117. #define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
  118. #define WGL_TYPE_COLORINDEX_ARB 0x202C
  119. #define WGL_TYPE_RGBA_ARB 0x202B
  120. #define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
  121. #define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
  122. #define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
  123. #define WGL_CONTEXT_FLAGS_ARB 0x2094
  124. #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
  125. #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
  126. #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
  127. #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
  128. #define WGL_ERROR_INVALID_VERSION_ARB 0x2095
  129. #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
  130. #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
  131. #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
  132. #define WGL_ERROR_INVALID_PROFILE_ARB 0x2096
  133. #define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
  134. #define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
  135. #define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
  136. #define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
  137. #define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
  138. #define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
  139. #ifndef WGL_ARB_extensions_string
  140. #define WGL_ARB_extensions_string 1
  141. extern const char * (CODEGEN_FUNCPTR *_ptrc_wglGetExtensionsStringARB)(HDC);
  142. #define wglGetExtensionsStringARB _ptrc_wglGetExtensionsStringARB
  143. #endif /*WGL_ARB_extensions_string*/
  144. #ifndef WGL_ARB_pixel_format
  145. #define WGL_ARB_pixel_format 1
  146. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
  147. #define wglChoosePixelFormatARB _ptrc_wglChoosePixelFormatARB
  148. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglGetPixelFormatAttribfvARB)(HDC, int, int, UINT, const int *, FLOAT *);
  149. #define wglGetPixelFormatAttribfvARB _ptrc_wglGetPixelFormatAttribfvARB
  150. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int *, int *);
  151. #define wglGetPixelFormatAttribivARB _ptrc_wglGetPixelFormatAttribivARB
  152. #endif /*WGL_ARB_pixel_format*/
  153. #ifndef WGL_ARB_create_context
  154. #define WGL_ARB_create_context 1
  155. extern HGLRC (CODEGEN_FUNCPTR *_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, const int *);
  156. #define wglCreateContextAttribsARB _ptrc_wglCreateContextAttribsARB
  157. #endif /*WGL_ARB_create_context*/
  158. #ifndef WGL_EXT_swap_control
  159. #define WGL_EXT_swap_control 1
  160. extern int (CODEGEN_FUNCPTR *_ptrc_wglGetSwapIntervalEXT)();
  161. #define wglGetSwapIntervalEXT _ptrc_wglGetSwapIntervalEXT
  162. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglSwapIntervalEXT)(int);
  163. #define wglSwapIntervalEXT _ptrc_wglSwapIntervalEXT
  164. #endif /*WGL_EXT_swap_control*/
  165. #ifndef WGL_NV_swap_group
  166. #define WGL_NV_swap_group 1
  167. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglBindSwapBarrierNV)(GLuint, GLuint);
  168. #define wglBindSwapBarrierNV _ptrc_wglBindSwapBarrierNV
  169. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglJoinSwapGroupNV)(HDC, GLuint);
  170. #define wglJoinSwapGroupNV _ptrc_wglJoinSwapGroupNV
  171. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglQueryFrameCountNV)(HDC, GLuint *);
  172. #define wglQueryFrameCountNV _ptrc_wglQueryFrameCountNV
  173. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglQueryMaxSwapGroupsNV)(HDC, GLuint *, GLuint *);
  174. #define wglQueryMaxSwapGroupsNV _ptrc_wglQueryMaxSwapGroupsNV
  175. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglQuerySwapGroupNV)(HDC, GLuint *, GLuint *);
  176. #define wglQuerySwapGroupNV _ptrc_wglQuerySwapGroupNV
  177. extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglResetFrameCountNV)(HDC);
  178. #define wglResetFrameCountNV _ptrc_wglResetFrameCountNV
  179. #endif /*WGL_NV_swap_group*/
  180. enum wgl_LoadStatus
  181. {
  182. wgl_LOAD_FAILED = 0,
  183. wgl_LOAD_SUCCEEDED = 1,
  184. };
  185. int wgl_LoadFunctions(HDC hdc);
  186. #ifdef __cplusplus
  187. }
  188. #endif /*__cplusplus*/
  189. #endif //POINTER_C_GENERATED_HEADER_WINDOWSGL_H