glplatform-wgl.c 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. #ifndef _WIN32
  2. extern void (*glXGetProcAddress(const unsigned char *))(void);
  3. static inline void *LoadProcAddress(const char *name) { return glXGetProcAddress((const unsigned char *)name); }
  4. #include <stdio.h>
  5. #else
  6. #include <windows.h>
  7. #include <wingdi.h>
  8. #include <stdio.h>
  9. static PROC LoadProcAddress(const char *name) {
  10. PROC addr = wglGetProcAddress((LPCSTR)name);
  11. if (addr) return addr;
  12. else return (PROC)GetProcAddress(GetModuleHandleA("OpenGL32.dll"), (LPCSTR)name);
  13. }
  14. #endif
  15. #define GLPLATFORM_WGL_VERSION 10
  16. #define GLPLATFORM_ENABLE_WGL_3DFX_multisample
  17. #define GLPLATFORM_ENABLE_WGL_3DL_stereo_control
  18. #define GLPLATFORM_ENABLE_WGL_AMD_gpu_association
  19. #define GLPLATFORM_ENABLE_WGL_ARB_buffer_region
  20. #define GLPLATFORM_ENABLE_WGL_ARB_context_flush_control
  21. #define GLPLATFORM_ENABLE_WGL_ARB_create_context
  22. #define GLPLATFORM_ENABLE_WGL_ARB_create_context_profile
  23. #define GLPLATFORM_ENABLE_WGL_ARB_create_context_robustness
  24. #define GLPLATFORM_ENABLE_WGL_ARB_extensions_string
  25. #define GLPLATFORM_ENABLE_WGL_ARB_framebuffer_sRGB
  26. #define GLPLATFORM_ENABLE_WGL_ARB_make_current_read
  27. #define GLPLATFORM_ENABLE_WGL_ARB_multisample
  28. #define GLPLATFORM_ENABLE_WGL_ARB_pbuffer
  29. #define GLPLATFORM_ENABLE_WGL_ARB_pixel_format
  30. #define GLPLATFORM_ENABLE_WGL_ARB_pixel_format_float
  31. #define GLPLATFORM_ENABLE_WGL_ARB_render_texture
  32. #define GLPLATFORM_ENABLE_WGL_ARB_robustness_application_isolation
  33. #define GLPLATFORM_ENABLE_WGL_ARB_robustness_share_group_isolation
  34. #define GLPLATFORM_ENABLE_WGL_ATI_pixel_format_float
  35. #define GLPLATFORM_ENABLE_WGL_EXT_create_context_es2_profile
  36. #define GLPLATFORM_ENABLE_WGL_EXT_create_context_es_profile
  37. #define GLPLATFORM_ENABLE_WGL_EXT_depth_float
  38. #define GLPLATFORM_ENABLE_WGL_EXT_display_color_table
  39. #define GLPLATFORM_ENABLE_WGL_EXT_extensions_string
  40. #define GLPLATFORM_ENABLE_WGL_EXT_framebuffer_sRGB
  41. #define GLPLATFORM_ENABLE_WGL_EXT_make_current_read
  42. #define GLPLATFORM_ENABLE_WGL_EXT_multisample
  43. #define GLPLATFORM_ENABLE_WGL_EXT_pbuffer
  44. #define GLPLATFORM_ENABLE_WGL_EXT_pixel_format
  45. #define GLPLATFORM_ENABLE_WGL_EXT_pixel_format_packed_float
  46. #define GLPLATFORM_ENABLE_WGL_EXT_swap_control
  47. #define GLPLATFORM_ENABLE_WGL_EXT_swap_control_tear
  48. #define GLPLATFORM_ENABLE_WGL_I3D_digital_video_control
  49. #define GLPLATFORM_ENABLE_WGL_I3D_gamma
  50. #define GLPLATFORM_ENABLE_WGL_I3D_genlock
  51. #define GLPLATFORM_ENABLE_WGL_I3D_image_buffer
  52. #define GLPLATFORM_ENABLE_WGL_I3D_swap_frame_lock
  53. #define GLPLATFORM_ENABLE_WGL_I3D_swap_frame_usage
  54. #define GLPLATFORM_ENABLE_WGL_NV_DX_interop
  55. #define GLPLATFORM_ENABLE_WGL_NV_DX_interop2
  56. #define GLPLATFORM_ENABLE_WGL_NV_copy_image
  57. #define GLPLATFORM_ENABLE_WGL_NV_delay_before_swap
  58. #define GLPLATFORM_ENABLE_WGL_NV_float_buffer
  59. #define GLPLATFORM_ENABLE_WGL_NV_gpu_affinity
  60. #define GLPLATFORM_ENABLE_WGL_NV_multisample_coverage
  61. #define GLPLATFORM_ENABLE_WGL_NV_present_video
  62. #define GLPLATFORM_ENABLE_WGL_NV_render_depth_texture
  63. #define GLPLATFORM_ENABLE_WGL_NV_render_texture_rectangle
  64. #define GLPLATFORM_ENABLE_WGL_NV_swap_group
  65. #define GLPLATFORM_ENABLE_WGL_NV_vertex_array_range
  66. #define GLPLATFORM_ENABLE_WGL_NV_video_capture
  67. #define GLPLATFORM_ENABLE_WGL_NV_video_output
  68. #define GLPLATFORM_ENABLE_WGL_OML_sync_control
  69. #include "glplatform-wgl.h"
  70. void * (*wglAllocateMemoryNV)(GLsizei, GLfloat, GLfloat, GLfloat) = NULL;
  71. BOOL (*wglAssociateImageBufferEventsI3D)(HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT) = NULL;
  72. BOOL (*wglBeginFrameTrackingI3D)() = NULL;
  73. GLboolean (*wglBindDisplayColorTableEXT)(GLushort) = NULL;
  74. BOOL (*wglBindSwapBarrierNV)(GLuint, GLuint) = NULL;
  75. BOOL (*wglBindTexImageARB)(HPBUFFERARB, int ) = NULL;
  76. BOOL (*wglBindVideoCaptureDeviceNV)(UINT, HVIDEOINPUTDEVICENV) = NULL;
  77. BOOL (*wglBindVideoDeviceNV)(HDC, unsigned int , HVIDEOOUTPUTDEVICENV, const int *) = NULL;
  78. BOOL (*wglBindVideoImageNV)(HPVIDEODEV, HPBUFFERARB, int ) = NULL;
  79. VOID (*wglBlitContextFramebufferAMD)(HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) = NULL;
  80. BOOL (*wglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *) = NULL;
  81. BOOL (*wglChoosePixelFormatEXT)(HDC, const int *, const FLOAT *, UINT, int *, UINT *) = NULL;
  82. BOOL (*wglCopyContext)(HGLRC, HGLRC, UINT) = NULL;
  83. BOOL (*wglCopyImageSubDataNV)(HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei) = NULL;
  84. HDC (*wglCreateAffinityDCNV)(const HGPUNV *) = NULL;
  85. HGLRC (*wglCreateAssociatedContextAMD)(UINT) = NULL;
  86. HGLRC (*wglCreateAssociatedContextAttribsAMD)(UINT, HGLRC, const int *) = NULL;
  87. HANDLE (*wglCreateBufferRegionARB)(HDC, int , UINT) = NULL;
  88. HGLRC (*wglCreateContextAttribsARB)(HDC, HGLRC, const int *) = NULL;
  89. GLboolean (*wglCreateDisplayColorTableEXT)(GLushort) = NULL;
  90. LPVOID (*wglCreateImageBufferI3D)(HDC, DWORD, UINT) = NULL;
  91. HGLRC (*wglCreateLayerContext)(HDC, int ) = NULL;
  92. HPBUFFERARB (*wglCreatePbufferARB)(HDC, int , int , int , const int *) = NULL;
  93. HPBUFFEREXT (*wglCreatePbufferEXT)(HDC, int , int , int , const int *) = NULL;
  94. BOOL (*wglDXCloseDeviceNV)(HANDLE) = NULL;
  95. BOOL (*wglDXLockObjectsNV)(HANDLE, GLint, HANDLE *) = NULL;
  96. BOOL (*wglDXObjectAccessNV)(HANDLE, GLenum) = NULL;
  97. HANDLE (*wglDXOpenDeviceNV)(void *) = NULL;
  98. HANDLE (*wglDXRegisterObjectNV)(HANDLE, void *, GLuint, GLenum, GLenum) = NULL;
  99. BOOL (*wglDXSetResourceShareHandleNV)(void *, HANDLE) = NULL;
  100. BOOL (*wglDXUnlockObjectsNV)(HANDLE, GLint, HANDLE *) = NULL;
  101. BOOL (*wglDXUnregisterObjectNV)(HANDLE, HANDLE) = NULL;
  102. BOOL (*wglDelayBeforeSwapNV)(HDC, GLfloat) = NULL;
  103. BOOL (*wglDeleteAssociatedContextAMD)(HGLRC) = NULL;
  104. VOID (*wglDeleteBufferRegionARB)(HANDLE) = NULL;
  105. BOOL (*wglDeleteContext)(HGLRC) = NULL;
  106. BOOL (*wglDeleteDCNV)(HDC) = NULL;
  107. BOOL (*wglDescribeLayerPlane)(HDC, int , int , UINT, const LAYERPLANEDESCRIPTOR *) = NULL;
  108. VOID (*wglDestroyDisplayColorTableEXT)(GLushort) = NULL;
  109. BOOL (*wglDestroyImageBufferI3D)(HDC, LPVOID) = NULL;
  110. BOOL (*wglDestroyPbufferARB)(HPBUFFERARB) = NULL;
  111. BOOL (*wglDestroyPbufferEXT)(HPBUFFEREXT) = NULL;
  112. BOOL (*wglDisableFrameLockI3D)() = NULL;
  113. BOOL (*wglDisableGenlockI3D)(HDC) = NULL;
  114. BOOL (*wglEnableFrameLockI3D)() = NULL;
  115. BOOL (*wglEnableGenlockI3D)(HDC) = NULL;
  116. BOOL (*wglEndFrameTrackingI3D)() = NULL;
  117. BOOL (*wglEnumGpuDevicesNV)(HGPUNV, UINT, PGPU_DEVICE) = NULL;
  118. BOOL (*wglEnumGpusFromAffinityDCNV)(HDC, UINT, HGPUNV *) = NULL;
  119. BOOL (*wglEnumGpusNV)(UINT, HGPUNV *) = NULL;
  120. UINT (*wglEnumerateVideoCaptureDevicesNV)(HDC, HVIDEOINPUTDEVICENV *) = NULL;
  121. int (*wglEnumerateVideoDevicesNV)(HDC, HVIDEOOUTPUTDEVICENV *) = NULL;
  122. void (*wglFreeMemoryNV)(void *) = NULL;
  123. BOOL (*wglGenlockSampleRateI3D)(HDC, UINT) = NULL;
  124. BOOL (*wglGenlockSourceDelayI3D)(HDC, UINT) = NULL;
  125. BOOL (*wglGenlockSourceEdgeI3D)(HDC, UINT) = NULL;
  126. BOOL (*wglGenlockSourceI3D)(HDC, UINT) = NULL;
  127. UINT (*wglGetContextGPUIDAMD)(HGLRC) = NULL;
  128. HGLRC (*wglGetCurrentAssociatedContextAMD)() = NULL;
  129. HGLRC (*wglGetCurrentContext)() = NULL;
  130. HDC (*wglGetCurrentDC)() = NULL;
  131. HDC (*wglGetCurrentReadDCARB)() = NULL;
  132. HDC (*wglGetCurrentReadDCEXT)() = NULL;
  133. BOOL (*wglGetDigitalVideoParametersI3D)(HDC, int , int *) = NULL;
  134. const char * (*wglGetExtensionsStringARB)(HDC) = NULL;
  135. const char * (*wglGetExtensionsStringEXT)() = NULL;
  136. BOOL (*wglGetFrameUsageI3D)(float *) = NULL;
  137. UINT (*wglGetGPUIDsAMD)(UINT, UINT *) = NULL;
  138. INT (*wglGetGPUInfoAMD)(UINT, int , GLenum, UINT, void *) = NULL;
  139. BOOL (*wglGetGammaTableI3D)(HDC, int , USHORT *, USHORT *, USHORT *) = NULL;
  140. BOOL (*wglGetGammaTableParametersI3D)(HDC, int , int *) = NULL;
  141. BOOL (*wglGetGenlockSampleRateI3D)(HDC, UINT *) = NULL;
  142. BOOL (*wglGetGenlockSourceDelayI3D)(HDC, UINT *) = NULL;
  143. BOOL (*wglGetGenlockSourceEdgeI3D)(HDC, UINT *) = NULL;
  144. BOOL (*wglGetGenlockSourceI3D)(HDC, UINT *) = NULL;
  145. int (*wglGetLayerPaletteEntries)(HDC, int , int , int , const COLORREF *) = NULL;
  146. BOOL (*wglGetMscRateOML)(HDC, INT32 *, INT32 *) = NULL;
  147. HDC (*wglGetPbufferDCARB)(HPBUFFERARB) = NULL;
  148. HDC (*wglGetPbufferDCEXT)(HPBUFFEREXT) = NULL;
  149. BOOL (*wglGetPixelFormatAttribfvARB)(HDC, int , int , UINT, const int *, FLOAT *) = NULL;
  150. BOOL (*wglGetPixelFormatAttribfvEXT)(HDC, int , int , UINT, int *, FLOAT *) = NULL;
  151. BOOL (*wglGetPixelFormatAttribivARB)(HDC, int , int , UINT, const int *, int *) = NULL;
  152. BOOL (*wglGetPixelFormatAttribivEXT)(HDC, int , int , UINT, int *, int *) = NULL;
  153. PROC (*wglGetProcAddress)(LPCSTR) = NULL;
  154. int (*wglGetSwapIntervalEXT)() = NULL;
  155. BOOL (*wglGetSyncValuesOML)(HDC, INT64 *, INT64 *, INT64 *) = NULL;
  156. BOOL (*wglGetVideoDeviceNV)(HDC, int , HPVIDEODEV *) = NULL;
  157. BOOL (*wglGetVideoInfoNV)(HPVIDEODEV, unsigned long *, unsigned long *) = NULL;
  158. BOOL (*wglIsEnabledFrameLockI3D)(BOOL *) = NULL;
  159. BOOL (*wglIsEnabledGenlockI3D)(HDC, BOOL *) = NULL;
  160. BOOL (*wglJoinSwapGroupNV)(HDC, GLuint) = NULL;
  161. GLboolean (*wglLoadDisplayColorTableEXT)(const GLushort *, GLuint) = NULL;
  162. BOOL (*wglLockVideoCaptureDeviceNV)(HDC, HVIDEOINPUTDEVICENV) = NULL;
  163. BOOL (*wglMakeAssociatedContextCurrentAMD)(HGLRC) = NULL;
  164. BOOL (*wglMakeContextCurrentARB)(HDC, HDC, HGLRC) = NULL;
  165. BOOL (*wglMakeContextCurrentEXT)(HDC, HDC, HGLRC) = NULL;
  166. BOOL (*wglQueryCurrentContextNV)(int , int *) = NULL;
  167. BOOL (*wglQueryFrameCountNV)(HDC, GLuint *) = NULL;
  168. BOOL (*wglQueryFrameLockMasterI3D)(BOOL *) = NULL;
  169. BOOL (*wglQueryFrameTrackingI3D)(DWORD *, DWORD *, float *) = NULL;
  170. BOOL (*wglQueryGenlockMaxSourceDelayI3D)(HDC, UINT *, UINT *) = NULL;
  171. BOOL (*wglQueryMaxSwapGroupsNV)(HDC, GLuint *, GLuint *) = NULL;
  172. BOOL (*wglQueryPbufferARB)(HPBUFFERARB, int , int *) = NULL;
  173. BOOL (*wglQueryPbufferEXT)(HPBUFFEREXT, int , int *) = NULL;
  174. BOOL (*wglQuerySwapGroupNV)(HDC, GLuint *, GLuint *) = NULL;
  175. BOOL (*wglQueryVideoCaptureDeviceNV)(HDC, HVIDEOINPUTDEVICENV, int , int *) = NULL;
  176. BOOL (*wglRealizeLayerPalette)(HDC, int , BOOL) = NULL;
  177. BOOL (*wglReleaseImageBufferEventsI3D)(HDC, const LPVOID *, UINT) = NULL;
  178. int (*wglReleasePbufferDCARB)(HPBUFFERARB, HDC) = NULL;
  179. int (*wglReleasePbufferDCEXT)(HPBUFFEREXT, HDC) = NULL;
  180. BOOL (*wglReleaseTexImageARB)(HPBUFFERARB, int ) = NULL;
  181. BOOL (*wglReleaseVideoCaptureDeviceNV)(HDC, HVIDEOINPUTDEVICENV) = NULL;
  182. BOOL (*wglReleaseVideoDeviceNV)(HPVIDEODEV) = NULL;
  183. BOOL (*wglReleaseVideoImageNV)(HPBUFFERARB, int ) = NULL;
  184. BOOL (*wglResetFrameCountNV)(HDC) = NULL;
  185. BOOL (*wglRestoreBufferRegionARB)(HANDLE, int , int , int , int , int , int ) = NULL;
  186. BOOL (*wglSaveBufferRegionARB)(HANDLE, int , int , int , int ) = NULL;
  187. BOOL (*wglSendPbufferToVideoNV)(HPBUFFERARB, int , unsigned long *, BOOL) = NULL;
  188. BOOL (*wglSetDigitalVideoParametersI3D)(HDC, int , const int *) = NULL;
  189. BOOL (*wglSetGammaTableI3D)(HDC, int , const USHORT *, const USHORT *, const USHORT *) = NULL;
  190. BOOL (*wglSetGammaTableParametersI3D)(HDC, int , const int *) = NULL;
  191. int (*wglSetLayerPaletteEntries)(HDC, int , int , int , const COLORREF *) = NULL;
  192. BOOL (*wglSetPbufferAttribARB)(HPBUFFERARB, const int *) = NULL;
  193. BOOL (*wglSetStereoEmitterState3DL)(HDC, UINT) = NULL;
  194. BOOL (*wglShareLists)(HGLRC, HGLRC) = NULL;
  195. INT64 (*wglSwapBuffersMscOML)(HDC, INT64, INT64, INT64) = NULL;
  196. BOOL (*wglSwapIntervalEXT)(int ) = NULL;
  197. BOOL (*wglSwapLayerBuffers)(HDC, UINT) = NULL;
  198. INT64 (*wglSwapLayerBuffersMscOML)(HDC, int , INT64, INT64, INT64) = NULL;
  199. BOOL (*wglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD) = NULL;
  200. BOOL (*wglUseFontBitmapsA)(HDC, DWORD, DWORD, DWORD) = NULL;
  201. BOOL (*wglUseFontBitmapsW)(HDC, DWORD, DWORD, DWORD) = NULL;
  202. BOOL (*wglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) = NULL;
  203. BOOL (*wglUseFontOutlinesA)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) = NULL;
  204. BOOL (*wglUseFontOutlinesW)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) = NULL;
  205. BOOL (*wglWaitForMscOML)(HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *) = NULL;
  206. BOOL (*wglWaitForSbcOML)(HDC, INT64, INT64 *, INT64 *, INT64 *) = NULL;
  207. bool GLPLATFORM_WGL_3DFX_multisample = false;
  208. bool GLPLATFORM_WGL_3DL_stereo_control = false;
  209. bool GLPLATFORM_WGL_AMD_gpu_association = false;
  210. bool GLPLATFORM_WGL_ARB_buffer_region = false;
  211. bool GLPLATFORM_WGL_ARB_context_flush_control = false;
  212. bool GLPLATFORM_WGL_ARB_create_context = false;
  213. bool GLPLATFORM_WGL_ARB_create_context_profile = false;
  214. bool GLPLATFORM_WGL_ARB_create_context_robustness = false;
  215. bool GLPLATFORM_WGL_ARB_extensions_string = false;
  216. bool GLPLATFORM_WGL_ARB_framebuffer_sRGB = false;
  217. bool GLPLATFORM_WGL_ARB_make_current_read = false;
  218. bool GLPLATFORM_WGL_ARB_multisample = false;
  219. bool GLPLATFORM_WGL_ARB_pbuffer = false;
  220. bool GLPLATFORM_WGL_ARB_pixel_format = false;
  221. bool GLPLATFORM_WGL_ARB_pixel_format_float = false;
  222. bool GLPLATFORM_WGL_ARB_render_texture = false;
  223. bool GLPLATFORM_WGL_ARB_robustness_application_isolation = false;
  224. bool GLPLATFORM_WGL_ARB_robustness_share_group_isolation = false;
  225. bool GLPLATFORM_WGL_ATI_pixel_format_float = false;
  226. bool GLPLATFORM_WGL_EXT_create_context_es2_profile = false;
  227. bool GLPLATFORM_WGL_EXT_create_context_es_profile = false;
  228. bool GLPLATFORM_WGL_EXT_depth_float = false;
  229. bool GLPLATFORM_WGL_EXT_display_color_table = false;
  230. bool GLPLATFORM_WGL_EXT_extensions_string = false;
  231. bool GLPLATFORM_WGL_EXT_framebuffer_sRGB = false;
  232. bool GLPLATFORM_WGL_EXT_make_current_read = false;
  233. bool GLPLATFORM_WGL_EXT_multisample = false;
  234. bool GLPLATFORM_WGL_EXT_pbuffer = false;
  235. bool GLPLATFORM_WGL_EXT_pixel_format = false;
  236. bool GLPLATFORM_WGL_EXT_pixel_format_packed_float = false;
  237. bool GLPLATFORM_WGL_EXT_swap_control = false;
  238. bool GLPLATFORM_WGL_EXT_swap_control_tear = false;
  239. bool GLPLATFORM_WGL_I3D_digital_video_control = false;
  240. bool GLPLATFORM_WGL_I3D_gamma = false;
  241. bool GLPLATFORM_WGL_I3D_genlock = false;
  242. bool GLPLATFORM_WGL_I3D_image_buffer = false;
  243. bool GLPLATFORM_WGL_I3D_swap_frame_lock = false;
  244. bool GLPLATFORM_WGL_I3D_swap_frame_usage = false;
  245. bool GLPLATFORM_WGL_NV_DX_interop = false;
  246. bool GLPLATFORM_WGL_NV_DX_interop2 = false;
  247. bool GLPLATFORM_WGL_NV_copy_image = false;
  248. bool GLPLATFORM_WGL_NV_delay_before_swap = false;
  249. bool GLPLATFORM_WGL_NV_float_buffer = false;
  250. bool GLPLATFORM_WGL_NV_gpu_affinity = false;
  251. bool GLPLATFORM_WGL_NV_multisample_coverage = false;
  252. bool GLPLATFORM_WGL_NV_present_video = false;
  253. bool GLPLATFORM_WGL_NV_render_depth_texture = false;
  254. bool GLPLATFORM_WGL_NV_render_texture_rectangle = false;
  255. bool GLPLATFORM_WGL_NV_swap_group = false;
  256. bool GLPLATFORM_WGL_NV_vertex_array_range = false;
  257. bool GLPLATFORM_WGL_NV_video_capture = false;
  258. bool GLPLATFORM_WGL_NV_video_output = false;
  259. bool GLPLATFORM_WGL_OML_sync_control = false;
  260. bool glplatform_wgl_init(int maj, int min)
  261. {
  262. int req_version = maj * 10 + min;
  263. if (req_version < 10) return false;
  264. if (req_version > 10) return false;
  265. wglAllocateMemoryNV = (void * (*)(GLsizei, GLfloat, GLfloat, GLfloat) ) LoadProcAddress("wglAllocateMemoryNV");
  266. wglAssociateImageBufferEventsI3D = (BOOL (*)(HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT) ) LoadProcAddress("wglAssociateImageBufferEventsI3D");
  267. wglBeginFrameTrackingI3D = (BOOL (*)() ) LoadProcAddress("wglBeginFrameTrackingI3D");
  268. wglBindDisplayColorTableEXT = (GLboolean (*)(GLushort) ) LoadProcAddress("wglBindDisplayColorTableEXT");
  269. wglBindSwapBarrierNV = (BOOL (*)(GLuint, GLuint) ) LoadProcAddress("wglBindSwapBarrierNV");
  270. wglBindTexImageARB = (BOOL (*)(HPBUFFERARB, int ) ) LoadProcAddress("wglBindTexImageARB");
  271. wglBindVideoCaptureDeviceNV = (BOOL (*)(UINT, HVIDEOINPUTDEVICENV) ) LoadProcAddress("wglBindVideoCaptureDeviceNV");
  272. wglBindVideoDeviceNV = (BOOL (*)(HDC, unsigned int , HVIDEOOUTPUTDEVICENV, const int *) ) LoadProcAddress("wglBindVideoDeviceNV");
  273. wglBindVideoImageNV = (BOOL (*)(HPVIDEODEV, HPBUFFERARB, int ) ) LoadProcAddress("wglBindVideoImageNV");
  274. wglBlitContextFramebufferAMD = (VOID (*)(HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum) ) LoadProcAddress("wglBlitContextFramebufferAMD");
  275. wglChoosePixelFormatARB = (BOOL (*)(HDC, const int *, const FLOAT *, UINT, int *, UINT *) ) LoadProcAddress("wglChoosePixelFormatARB");
  276. wglChoosePixelFormatEXT = (BOOL (*)(HDC, const int *, const FLOAT *, UINT, int *, UINT *) ) LoadProcAddress("wglChoosePixelFormatEXT");
  277. wglCopyContext = (BOOL (*)(HGLRC, HGLRC, UINT) ) LoadProcAddress("wglCopyContext");
  278. wglCopyImageSubDataNV = (BOOL (*)(HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei) ) LoadProcAddress("wglCopyImageSubDataNV");
  279. wglCreateAffinityDCNV = (HDC (*)(const HGPUNV *) ) LoadProcAddress("wglCreateAffinityDCNV");
  280. wglCreateAssociatedContextAMD = (HGLRC (*)(UINT) ) LoadProcAddress("wglCreateAssociatedContextAMD");
  281. wglCreateAssociatedContextAttribsAMD = (HGLRC (*)(UINT, HGLRC, const int *) ) LoadProcAddress("wglCreateAssociatedContextAttribsAMD");
  282. wglCreateBufferRegionARB = (HANDLE (*)(HDC, int , UINT) ) LoadProcAddress("wglCreateBufferRegionARB");
  283. wglCreateContextAttribsARB = (HGLRC (*)(HDC, HGLRC, const int *) ) LoadProcAddress("wglCreateContextAttribsARB");
  284. wglCreateDisplayColorTableEXT = (GLboolean (*)(GLushort) ) LoadProcAddress("wglCreateDisplayColorTableEXT");
  285. wglCreateImageBufferI3D = (LPVOID (*)(HDC, DWORD, UINT) ) LoadProcAddress("wglCreateImageBufferI3D");
  286. wglCreateLayerContext = (HGLRC (*)(HDC, int ) ) LoadProcAddress("wglCreateLayerContext");
  287. wglCreatePbufferARB = (HPBUFFERARB (*)(HDC, int , int , int , const int *) ) LoadProcAddress("wglCreatePbufferARB");
  288. wglCreatePbufferEXT = (HPBUFFEREXT (*)(HDC, int , int , int , const int *) ) LoadProcAddress("wglCreatePbufferEXT");
  289. wglDXCloseDeviceNV = (BOOL (*)(HANDLE) ) LoadProcAddress("wglDXCloseDeviceNV");
  290. wglDXLockObjectsNV = (BOOL (*)(HANDLE, GLint, HANDLE *) ) LoadProcAddress("wglDXLockObjectsNV");
  291. wglDXObjectAccessNV = (BOOL (*)(HANDLE, GLenum) ) LoadProcAddress("wglDXObjectAccessNV");
  292. wglDXOpenDeviceNV = (HANDLE (*)(void *) ) LoadProcAddress("wglDXOpenDeviceNV");
  293. wglDXRegisterObjectNV = (HANDLE (*)(HANDLE, void *, GLuint, GLenum, GLenum) ) LoadProcAddress("wglDXRegisterObjectNV");
  294. wglDXSetResourceShareHandleNV = (BOOL (*)(void *, HANDLE) ) LoadProcAddress("wglDXSetResourceShareHandleNV");
  295. wglDXUnlockObjectsNV = (BOOL (*)(HANDLE, GLint, HANDLE *) ) LoadProcAddress("wglDXUnlockObjectsNV");
  296. wglDXUnregisterObjectNV = (BOOL (*)(HANDLE, HANDLE) ) LoadProcAddress("wglDXUnregisterObjectNV");
  297. wglDelayBeforeSwapNV = (BOOL (*)(HDC, GLfloat) ) LoadProcAddress("wglDelayBeforeSwapNV");
  298. wglDeleteAssociatedContextAMD = (BOOL (*)(HGLRC) ) LoadProcAddress("wglDeleteAssociatedContextAMD");
  299. wglDeleteBufferRegionARB = (VOID (*)(HANDLE) ) LoadProcAddress("wglDeleteBufferRegionARB");
  300. wglDeleteContext = (BOOL (*)(HGLRC) ) LoadProcAddress("wglDeleteContext");
  301. wglDeleteDCNV = (BOOL (*)(HDC) ) LoadProcAddress("wglDeleteDCNV");
  302. wglDescribeLayerPlane = (BOOL (*)(HDC, int , int , UINT, const LAYERPLANEDESCRIPTOR *) ) LoadProcAddress("wglDescribeLayerPlane");
  303. wglDestroyDisplayColorTableEXT = (VOID (*)(GLushort) ) LoadProcAddress("wglDestroyDisplayColorTableEXT");
  304. wglDestroyImageBufferI3D = (BOOL (*)(HDC, LPVOID) ) LoadProcAddress("wglDestroyImageBufferI3D");
  305. wglDestroyPbufferARB = (BOOL (*)(HPBUFFERARB) ) LoadProcAddress("wglDestroyPbufferARB");
  306. wglDestroyPbufferEXT = (BOOL (*)(HPBUFFEREXT) ) LoadProcAddress("wglDestroyPbufferEXT");
  307. wglDisableFrameLockI3D = (BOOL (*)() ) LoadProcAddress("wglDisableFrameLockI3D");
  308. wglDisableGenlockI3D = (BOOL (*)(HDC) ) LoadProcAddress("wglDisableGenlockI3D");
  309. wglEnableFrameLockI3D = (BOOL (*)() ) LoadProcAddress("wglEnableFrameLockI3D");
  310. wglEnableGenlockI3D = (BOOL (*)(HDC) ) LoadProcAddress("wglEnableGenlockI3D");
  311. wglEndFrameTrackingI3D = (BOOL (*)() ) LoadProcAddress("wglEndFrameTrackingI3D");
  312. wglEnumGpuDevicesNV = (BOOL (*)(HGPUNV, UINT, PGPU_DEVICE) ) LoadProcAddress("wglEnumGpuDevicesNV");
  313. wglEnumGpusFromAffinityDCNV = (BOOL (*)(HDC, UINT, HGPUNV *) ) LoadProcAddress("wglEnumGpusFromAffinityDCNV");
  314. wglEnumGpusNV = (BOOL (*)(UINT, HGPUNV *) ) LoadProcAddress("wglEnumGpusNV");
  315. wglEnumerateVideoCaptureDevicesNV = (UINT (*)(HDC, HVIDEOINPUTDEVICENV *) ) LoadProcAddress("wglEnumerateVideoCaptureDevicesNV");
  316. wglEnumerateVideoDevicesNV = (int (*)(HDC, HVIDEOOUTPUTDEVICENV *) ) LoadProcAddress("wglEnumerateVideoDevicesNV");
  317. wglFreeMemoryNV = (void (*)(void *) ) LoadProcAddress("wglFreeMemoryNV");
  318. wglGenlockSampleRateI3D = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglGenlockSampleRateI3D");
  319. wglGenlockSourceDelayI3D = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglGenlockSourceDelayI3D");
  320. wglGenlockSourceEdgeI3D = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglGenlockSourceEdgeI3D");
  321. wglGenlockSourceI3D = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglGenlockSourceI3D");
  322. wglGetContextGPUIDAMD = (UINT (*)(HGLRC) ) LoadProcAddress("wglGetContextGPUIDAMD");
  323. wglGetCurrentAssociatedContextAMD = (HGLRC (*)() ) LoadProcAddress("wglGetCurrentAssociatedContextAMD");
  324. wglGetCurrentContext = (HGLRC (*)() ) LoadProcAddress("wglGetCurrentContext");
  325. wglGetCurrentDC = (HDC (*)() ) LoadProcAddress("wglGetCurrentDC");
  326. wglGetCurrentReadDCARB = (HDC (*)() ) LoadProcAddress("wglGetCurrentReadDCARB");
  327. wglGetCurrentReadDCEXT = (HDC (*)() ) LoadProcAddress("wglGetCurrentReadDCEXT");
  328. wglGetDigitalVideoParametersI3D = (BOOL (*)(HDC, int , int *) ) LoadProcAddress("wglGetDigitalVideoParametersI3D");
  329. wglGetExtensionsStringARB = (const char * (*)(HDC) ) LoadProcAddress("wglGetExtensionsStringARB");
  330. wglGetExtensionsStringEXT = (const char * (*)() ) LoadProcAddress("wglGetExtensionsStringEXT");
  331. wglGetFrameUsageI3D = (BOOL (*)(float *) ) LoadProcAddress("wglGetFrameUsageI3D");
  332. wglGetGPUIDsAMD = (UINT (*)(UINT, UINT *) ) LoadProcAddress("wglGetGPUIDsAMD");
  333. wglGetGPUInfoAMD = (INT (*)(UINT, int , GLenum, UINT, void *) ) LoadProcAddress("wglGetGPUInfoAMD");
  334. wglGetGammaTableI3D = (BOOL (*)(HDC, int , USHORT *, USHORT *, USHORT *) ) LoadProcAddress("wglGetGammaTableI3D");
  335. wglGetGammaTableParametersI3D = (BOOL (*)(HDC, int , int *) ) LoadProcAddress("wglGetGammaTableParametersI3D");
  336. wglGetGenlockSampleRateI3D = (BOOL (*)(HDC, UINT *) ) LoadProcAddress("wglGetGenlockSampleRateI3D");
  337. wglGetGenlockSourceDelayI3D = (BOOL (*)(HDC, UINT *) ) LoadProcAddress("wglGetGenlockSourceDelayI3D");
  338. wglGetGenlockSourceEdgeI3D = (BOOL (*)(HDC, UINT *) ) LoadProcAddress("wglGetGenlockSourceEdgeI3D");
  339. wglGetGenlockSourceI3D = (BOOL (*)(HDC, UINT *) ) LoadProcAddress("wglGetGenlockSourceI3D");
  340. wglGetLayerPaletteEntries = (int (*)(HDC, int , int , int , const COLORREF *) ) LoadProcAddress("wglGetLayerPaletteEntries");
  341. wglGetMscRateOML = (BOOL (*)(HDC, INT32 *, INT32 *) ) LoadProcAddress("wglGetMscRateOML");
  342. wglGetPbufferDCARB = (HDC (*)(HPBUFFERARB) ) LoadProcAddress("wglGetPbufferDCARB");
  343. wglGetPbufferDCEXT = (HDC (*)(HPBUFFEREXT) ) LoadProcAddress("wglGetPbufferDCEXT");
  344. wglGetPixelFormatAttribfvARB = (BOOL (*)(HDC, int , int , UINT, const int *, FLOAT *) ) LoadProcAddress("wglGetPixelFormatAttribfvARB");
  345. wglGetPixelFormatAttribfvEXT = (BOOL (*)(HDC, int , int , UINT, int *, FLOAT *) ) LoadProcAddress("wglGetPixelFormatAttribfvEXT");
  346. wglGetPixelFormatAttribivARB = (BOOL (*)(HDC, int , int , UINT, const int *, int *) ) LoadProcAddress("wglGetPixelFormatAttribivARB");
  347. wglGetPixelFormatAttribivEXT = (BOOL (*)(HDC, int , int , UINT, int *, int *) ) LoadProcAddress("wglGetPixelFormatAttribivEXT");
  348. wglGetProcAddress = (PROC (*)(LPCSTR) ) LoadProcAddress("wglGetProcAddress");
  349. wglGetSwapIntervalEXT = (int (*)() ) LoadProcAddress("wglGetSwapIntervalEXT");
  350. wglGetSyncValuesOML = (BOOL (*)(HDC, INT64 *, INT64 *, INT64 *) ) LoadProcAddress("wglGetSyncValuesOML");
  351. wglGetVideoDeviceNV = (BOOL (*)(HDC, int , HPVIDEODEV *) ) LoadProcAddress("wglGetVideoDeviceNV");
  352. wglGetVideoInfoNV = (BOOL (*)(HPVIDEODEV, unsigned long *, unsigned long *) ) LoadProcAddress("wglGetVideoInfoNV");
  353. wglIsEnabledFrameLockI3D = (BOOL (*)(BOOL *) ) LoadProcAddress("wglIsEnabledFrameLockI3D");
  354. wglIsEnabledGenlockI3D = (BOOL (*)(HDC, BOOL *) ) LoadProcAddress("wglIsEnabledGenlockI3D");
  355. wglJoinSwapGroupNV = (BOOL (*)(HDC, GLuint) ) LoadProcAddress("wglJoinSwapGroupNV");
  356. wglLoadDisplayColorTableEXT = (GLboolean (*)(const GLushort *, GLuint) ) LoadProcAddress("wglLoadDisplayColorTableEXT");
  357. wglLockVideoCaptureDeviceNV = (BOOL (*)(HDC, HVIDEOINPUTDEVICENV) ) LoadProcAddress("wglLockVideoCaptureDeviceNV");
  358. wglMakeAssociatedContextCurrentAMD = (BOOL (*)(HGLRC) ) LoadProcAddress("wglMakeAssociatedContextCurrentAMD");
  359. wglMakeContextCurrentARB = (BOOL (*)(HDC, HDC, HGLRC) ) LoadProcAddress("wglMakeContextCurrentARB");
  360. wglMakeContextCurrentEXT = (BOOL (*)(HDC, HDC, HGLRC) ) LoadProcAddress("wglMakeContextCurrentEXT");
  361. wglQueryCurrentContextNV = (BOOL (*)(int , int *) ) LoadProcAddress("wglQueryCurrentContextNV");
  362. wglQueryFrameCountNV = (BOOL (*)(HDC, GLuint *) ) LoadProcAddress("wglQueryFrameCountNV");
  363. wglQueryFrameLockMasterI3D = (BOOL (*)(BOOL *) ) LoadProcAddress("wglQueryFrameLockMasterI3D");
  364. wglQueryFrameTrackingI3D = (BOOL (*)(DWORD *, DWORD *, float *) ) LoadProcAddress("wglQueryFrameTrackingI3D");
  365. wglQueryGenlockMaxSourceDelayI3D = (BOOL (*)(HDC, UINT *, UINT *) ) LoadProcAddress("wglQueryGenlockMaxSourceDelayI3D");
  366. wglQueryMaxSwapGroupsNV = (BOOL (*)(HDC, GLuint *, GLuint *) ) LoadProcAddress("wglQueryMaxSwapGroupsNV");
  367. wglQueryPbufferARB = (BOOL (*)(HPBUFFERARB, int , int *) ) LoadProcAddress("wglQueryPbufferARB");
  368. wglQueryPbufferEXT = (BOOL (*)(HPBUFFEREXT, int , int *) ) LoadProcAddress("wglQueryPbufferEXT");
  369. wglQuerySwapGroupNV = (BOOL (*)(HDC, GLuint *, GLuint *) ) LoadProcAddress("wglQuerySwapGroupNV");
  370. wglQueryVideoCaptureDeviceNV = (BOOL (*)(HDC, HVIDEOINPUTDEVICENV, int , int *) ) LoadProcAddress("wglQueryVideoCaptureDeviceNV");
  371. wglRealizeLayerPalette = (BOOL (*)(HDC, int , BOOL) ) LoadProcAddress("wglRealizeLayerPalette");
  372. wglReleaseImageBufferEventsI3D = (BOOL (*)(HDC, const LPVOID *, UINT) ) LoadProcAddress("wglReleaseImageBufferEventsI3D");
  373. wglReleasePbufferDCARB = (int (*)(HPBUFFERARB, HDC) ) LoadProcAddress("wglReleasePbufferDCARB");
  374. wglReleasePbufferDCEXT = (int (*)(HPBUFFEREXT, HDC) ) LoadProcAddress("wglReleasePbufferDCEXT");
  375. wglReleaseTexImageARB = (BOOL (*)(HPBUFFERARB, int ) ) LoadProcAddress("wglReleaseTexImageARB");
  376. wglReleaseVideoCaptureDeviceNV = (BOOL (*)(HDC, HVIDEOINPUTDEVICENV) ) LoadProcAddress("wglReleaseVideoCaptureDeviceNV");
  377. wglReleaseVideoDeviceNV = (BOOL (*)(HPVIDEODEV) ) LoadProcAddress("wglReleaseVideoDeviceNV");
  378. wglReleaseVideoImageNV = (BOOL (*)(HPBUFFERARB, int ) ) LoadProcAddress("wglReleaseVideoImageNV");
  379. wglResetFrameCountNV = (BOOL (*)(HDC) ) LoadProcAddress("wglResetFrameCountNV");
  380. wglRestoreBufferRegionARB = (BOOL (*)(HANDLE, int , int , int , int , int , int ) ) LoadProcAddress("wglRestoreBufferRegionARB");
  381. wglSaveBufferRegionARB = (BOOL (*)(HANDLE, int , int , int , int ) ) LoadProcAddress("wglSaveBufferRegionARB");
  382. wglSendPbufferToVideoNV = (BOOL (*)(HPBUFFERARB, int , unsigned long *, BOOL) ) LoadProcAddress("wglSendPbufferToVideoNV");
  383. wglSetDigitalVideoParametersI3D = (BOOL (*)(HDC, int , const int *) ) LoadProcAddress("wglSetDigitalVideoParametersI3D");
  384. wglSetGammaTableI3D = (BOOL (*)(HDC, int , const USHORT *, const USHORT *, const USHORT *) ) LoadProcAddress("wglSetGammaTableI3D");
  385. wglSetGammaTableParametersI3D = (BOOL (*)(HDC, int , const int *) ) LoadProcAddress("wglSetGammaTableParametersI3D");
  386. wglSetLayerPaletteEntries = (int (*)(HDC, int , int , int , const COLORREF *) ) LoadProcAddress("wglSetLayerPaletteEntries");
  387. wglSetPbufferAttribARB = (BOOL (*)(HPBUFFERARB, const int *) ) LoadProcAddress("wglSetPbufferAttribARB");
  388. wglSetStereoEmitterState3DL = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglSetStereoEmitterState3DL");
  389. wglShareLists = (BOOL (*)(HGLRC, HGLRC) ) LoadProcAddress("wglShareLists");
  390. wglSwapBuffersMscOML = (INT64 (*)(HDC, INT64, INT64, INT64) ) LoadProcAddress("wglSwapBuffersMscOML");
  391. wglSwapIntervalEXT = (BOOL (*)(int ) ) LoadProcAddress("wglSwapIntervalEXT");
  392. wglSwapLayerBuffers = (BOOL (*)(HDC, UINT) ) LoadProcAddress("wglSwapLayerBuffers");
  393. wglSwapLayerBuffersMscOML = (INT64 (*)(HDC, int , INT64, INT64, INT64) ) LoadProcAddress("wglSwapLayerBuffersMscOML");
  394. wglUseFontBitmaps = (BOOL (*)(HDC, DWORD, DWORD, DWORD) ) LoadProcAddress("wglUseFontBitmaps");
  395. wglUseFontBitmapsA = (BOOL (*)(HDC, DWORD, DWORD, DWORD) ) LoadProcAddress("wglUseFontBitmapsA");
  396. wglUseFontBitmapsW = (BOOL (*)(HDC, DWORD, DWORD, DWORD) ) LoadProcAddress("wglUseFontBitmapsW");
  397. wglUseFontOutlines = (BOOL (*)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) ) LoadProcAddress("wglUseFontOutlines");
  398. wglUseFontOutlinesA = (BOOL (*)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) ) LoadProcAddress("wglUseFontOutlinesA");
  399. wglUseFontOutlinesW = (BOOL (*)(HDC, DWORD, DWORD, DWORD, FLOAT, FLOAT, int , LPGLYPHMETRICSFLOAT) ) LoadProcAddress("wglUseFontOutlinesW");
  400. wglWaitForMscOML = (BOOL (*)(HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *) ) LoadProcAddress("wglWaitForMscOML");
  401. wglWaitForSbcOML = (BOOL (*)(HDC, INT64, INT64 *, INT64 *, INT64 *) ) LoadProcAddress("wglWaitForSbcOML");
  402. GLPLATFORM_WGL_3DL_stereo_control = GLPLATFORM_WGL_3DL_stereo_control && wglSetStereoEmitterState3DL;
  403. GLPLATFORM_WGL_AMD_gpu_association = GLPLATFORM_WGL_AMD_gpu_association && wglBlitContextFramebufferAMD && wglCreateAssociatedContextAMD
  404. && wglCreateAssociatedContextAttribsAMD && wglDeleteAssociatedContextAMD && wglGetContextGPUIDAMD
  405. && wglGetCurrentAssociatedContextAMD && wglGetGPUIDsAMD && wglGetGPUInfoAMD
  406. && wglMakeAssociatedContextCurrentAMD;
  407. GLPLATFORM_WGL_ARB_buffer_region = GLPLATFORM_WGL_ARB_buffer_region && wglCreateBufferRegionARB && wglDeleteBufferRegionARB
  408. && wglRestoreBufferRegionARB && wglSaveBufferRegionARB;
  409. GLPLATFORM_WGL_ARB_create_context = GLPLATFORM_WGL_ARB_create_context && wglCreateContextAttribsARB;
  410. GLPLATFORM_WGL_ARB_extensions_string = GLPLATFORM_WGL_ARB_extensions_string && wglGetExtensionsStringARB;
  411. GLPLATFORM_WGL_ARB_make_current_read = GLPLATFORM_WGL_ARB_make_current_read && wglGetCurrentReadDCARB && wglMakeContextCurrentARB;
  412. GLPLATFORM_WGL_ARB_pbuffer = GLPLATFORM_WGL_ARB_pbuffer && wglCreatePbufferARB && wglDestroyPbufferARB
  413. && wglGetPbufferDCARB && wglQueryPbufferARB && wglReleasePbufferDCARB;
  414. GLPLATFORM_WGL_ARB_pixel_format = GLPLATFORM_WGL_ARB_pixel_format && wglChoosePixelFormatARB && wglGetPixelFormatAttribfvARB
  415. && wglGetPixelFormatAttribivARB;
  416. GLPLATFORM_WGL_ARB_render_texture = GLPLATFORM_WGL_ARB_render_texture && wglBindTexImageARB && wglReleaseTexImageARB
  417. && wglSetPbufferAttribARB;
  418. GLPLATFORM_WGL_EXT_display_color_table = GLPLATFORM_WGL_EXT_display_color_table && wglBindDisplayColorTableEXT && wglCreateDisplayColorTableEXT
  419. && wglDestroyDisplayColorTableEXT && wglLoadDisplayColorTableEXT;
  420. GLPLATFORM_WGL_EXT_extensions_string = GLPLATFORM_WGL_EXT_extensions_string && wglGetExtensionsStringEXT;
  421. GLPLATFORM_WGL_EXT_make_current_read = GLPLATFORM_WGL_EXT_make_current_read && wglGetCurrentReadDCEXT && wglMakeContextCurrentEXT;
  422. GLPLATFORM_WGL_EXT_pbuffer = GLPLATFORM_WGL_EXT_pbuffer && wglCreatePbufferEXT && wglDestroyPbufferEXT
  423. && wglGetPbufferDCEXT && wglQueryPbufferEXT && wglReleasePbufferDCEXT;
  424. GLPLATFORM_WGL_EXT_pixel_format = GLPLATFORM_WGL_EXT_pixel_format && wglChoosePixelFormatEXT && wglGetPixelFormatAttribfvEXT
  425. && wglGetPixelFormatAttribivEXT;
  426. GLPLATFORM_WGL_EXT_swap_control = GLPLATFORM_WGL_EXT_swap_control && wglGetSwapIntervalEXT && wglSwapIntervalEXT;
  427. GLPLATFORM_WGL_I3D_digital_video_control = GLPLATFORM_WGL_I3D_digital_video_control && wglGetDigitalVideoParametersI3D && wglSetDigitalVideoParametersI3D;
  428. GLPLATFORM_WGL_I3D_gamma = GLPLATFORM_WGL_I3D_gamma && wglGetGammaTableI3D && wglGetGammaTableParametersI3D
  429. && wglSetGammaTableI3D && wglSetGammaTableParametersI3D;
  430. GLPLATFORM_WGL_I3D_genlock = GLPLATFORM_WGL_I3D_genlock && wglDisableGenlockI3D && wglEnableGenlockI3D
  431. && wglGenlockSampleRateI3D && wglGenlockSourceDelayI3D && wglGenlockSourceEdgeI3D
  432. && wglGenlockSourceI3D && wglGetGenlockSampleRateI3D && wglGetGenlockSourceDelayI3D
  433. && wglGetGenlockSourceEdgeI3D && wglGetGenlockSourceI3D && wglIsEnabledGenlockI3D
  434. && wglQueryGenlockMaxSourceDelayI3D;
  435. GLPLATFORM_WGL_I3D_image_buffer = GLPLATFORM_WGL_I3D_image_buffer && wglAssociateImageBufferEventsI3D && wglCreateImageBufferI3D
  436. && wglDestroyImageBufferI3D && wglReleaseImageBufferEventsI3D;
  437. GLPLATFORM_WGL_I3D_swap_frame_lock = GLPLATFORM_WGL_I3D_swap_frame_lock && wglDisableFrameLockI3D && wglEnableFrameLockI3D
  438. && wglIsEnabledFrameLockI3D && wglQueryFrameLockMasterI3D;
  439. GLPLATFORM_WGL_I3D_swap_frame_usage = GLPLATFORM_WGL_I3D_swap_frame_usage && wglBeginFrameTrackingI3D && wglEndFrameTrackingI3D
  440. && wglGetFrameUsageI3D && wglQueryFrameTrackingI3D;
  441. GLPLATFORM_WGL_NV_DX_interop = GLPLATFORM_WGL_NV_DX_interop && wglDXCloseDeviceNV && wglDXLockObjectsNV
  442. && wglDXObjectAccessNV && wglDXOpenDeviceNV && wglDXRegisterObjectNV
  443. && wglDXSetResourceShareHandleNV && wglDXUnlockObjectsNV && wglDXUnregisterObjectNV;
  444. GLPLATFORM_WGL_NV_copy_image = GLPLATFORM_WGL_NV_copy_image && wglCopyImageSubDataNV;
  445. GLPLATFORM_WGL_NV_delay_before_swap = GLPLATFORM_WGL_NV_delay_before_swap && wglDelayBeforeSwapNV;
  446. GLPLATFORM_WGL_NV_gpu_affinity = GLPLATFORM_WGL_NV_gpu_affinity && wglCreateAffinityDCNV && wglDeleteDCNV
  447. && wglEnumGpuDevicesNV && wglEnumGpusFromAffinityDCNV && wglEnumGpusNV;
  448. GLPLATFORM_WGL_NV_present_video = GLPLATFORM_WGL_NV_present_video && wglBindVideoDeviceNV && wglEnumerateVideoDevicesNV
  449. && wglQueryCurrentContextNV;
  450. GLPLATFORM_WGL_NV_swap_group = GLPLATFORM_WGL_NV_swap_group && wglBindSwapBarrierNV && wglJoinSwapGroupNV
  451. && wglQueryFrameCountNV && wglQueryMaxSwapGroupsNV && wglQuerySwapGroupNV
  452. && wglResetFrameCountNV;
  453. GLPLATFORM_WGL_NV_vertex_array_range = GLPLATFORM_WGL_NV_vertex_array_range && wglAllocateMemoryNV && wglFreeMemoryNV;
  454. GLPLATFORM_WGL_NV_video_capture = GLPLATFORM_WGL_NV_video_capture && wglBindVideoCaptureDeviceNV && wglEnumerateVideoCaptureDevicesNV
  455. && wglLockVideoCaptureDeviceNV && wglQueryVideoCaptureDeviceNV && wglReleaseVideoCaptureDeviceNV;
  456. GLPLATFORM_WGL_NV_video_output = GLPLATFORM_WGL_NV_video_output && wglBindVideoImageNV && wglGetVideoDeviceNV
  457. && wglGetVideoInfoNV && wglReleaseVideoDeviceNV && wglReleaseVideoImageNV
  458. && wglSendPbufferToVideoNV;
  459. GLPLATFORM_WGL_OML_sync_control = GLPLATFORM_WGL_OML_sync_control && wglGetMscRateOML && wglGetSyncValuesOML
  460. && wglSwapBuffersMscOML && wglSwapLayerBuffersMscOML && wglWaitForMscOML
  461. && wglWaitForSbcOML;
  462. return wglCopyContext
  463. && wglCreateLayerContext && wglDeleteContext && wglDescribeLayerPlane
  464. && wglGetCurrentContext && wglGetCurrentDC && wglGetLayerPaletteEntries
  465. && wglGetProcAddress && wglRealizeLayerPalette
  466. && wglSetLayerPaletteEntries && wglShareLists && wglSwapLayerBuffers
  467. && wglUseFontBitmaps && wglUseFontBitmapsA && wglUseFontBitmapsW
  468. && wglUseFontOutlines && wglUseFontOutlinesA && wglUseFontOutlinesW;
  469. }