OLD | NEW |
1 /* | 1 /* |
2 ** The OpenGL Extension Wrangler Library | 2 ** The OpenGL Extension Wrangler Library |
3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> | 3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> |
4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> | 4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> |
5 ** Copyright (C) 2002, Lev Povalahev | 5 ** Copyright (C) 2002, Lev Povalahev |
6 ** All rights reserved. | 6 ** All rights reserved. |
7 ** | 7 ** |
8 ** Redistribution and use in source and binary forms, with or without | 8 ** Redistribution and use in source and binary forms, with or without |
9 ** modification, are permitted provided that the following conditions are met: | 9 ** modification, are permitted provided that the following conditions are met: |
10 ** | 10 ** |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 # define GLEWAPI extern __declspec(dllexport) | 80 # define GLEWAPI extern __declspec(dllexport) |
81 # else | 81 # else |
82 # define GLEWAPI extern __declspec(dllimport) | 82 # define GLEWAPI extern __declspec(dllimport) |
83 # endif | 83 # endif |
84 #endif | 84 #endif |
85 | 85 |
86 #ifdef __cplusplus | 86 #ifdef __cplusplus |
87 extern "C" { | 87 extern "C" { |
88 #endif | 88 #endif |
89 | 89 |
| 90 /* ------------------------------- Core WGL -------------------------------- */ |
| 91 |
| 92 /* This section supports dynamic lookup of the core WGL entry points |
| 93 under different names. It is not supported for GLEW_MX. */ |
| 94 |
| 95 #ifndef GLEW_MX |
| 96 |
| 97 #ifndef WGL_core_wgl |
| 98 #define WGL_core_wgl 1 |
| 99 |
| 100 typedef BOOL (WINAPI * PFNWGLCOPYCONTEXTPROC)(HGLRC, HGLRC, UINT); |
| 101 typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTPROC)(HDC); |
| 102 typedef HGLRC (WINAPI * PFNWGLCREATELAYERCONTEXTPROC)(HDC, int); |
| 103 typedef BOOL (WINAPI * PFNWGLDELETECONTEXTPROC)(HGLRC); |
| 104 typedef HGLRC (WINAPI * PFNWGLGETCURRENTCONTEXTPROC)(VOID); |
| 105 typedef HDC (WINAPI * PFNWGLGETCURRENTDCPROC)(VOID); |
| 106 typedef PROC (WINAPI * PFNWGLGETPROCADDRESSPROC)(LPCSTR); |
| 107 typedef BOOL (WINAPI * PFNWGLMAKECURRENTPROC)(HDC, HGLRC); |
| 108 typedef BOOL (WINAPI * PFNWGLSHARELISTSPROC)(HGLRC, HGLRC); |
| 109 typedef BOOL (WINAPI * PFNSWAPBUFFERSPROC)(HDC); |
| 110 |
| 111 #define wglewCopyContext WGLEW_GET_FUN(__wglewCopyContext) |
| 112 #define wglewCreateContext WGLEW_GET_FUN(__wglewCreateContext) |
| 113 #define wglewCreateLayerContext WGLEW_GET_FUN(__wglewCreateLayerContext) |
| 114 #define wglewDeleteContext WGLEW_GET_FUN(__wglewDeleteContext) |
| 115 #define wglewGetCurrentContext WGLEW_GET_FUN(__wglewGetCurrentContext) |
| 116 #define wglewGetCurrentDC WGLEW_GET_FUN(__wglewGetCurrentDC) |
| 117 #define wglewGetProcAddress WGLEW_GET_FUN(__wglewGetProcAddress) |
| 118 #define wglewMakeCurrent WGLEW_GET_FUN(__wglewMakeCurrent) |
| 119 #define wglewShareLists WGLEW_GET_FUN(__wglewShareLists) |
| 120 #define wglewSwapBuffers WGLEW_GET_FUN(__wglewSwapBuffers) |
| 121 |
| 122 #endif /* WGL_core_wgl */ |
| 123 |
| 124 #endif /* !GLEW_MX */ |
| 125 |
90 /* -------------------------- WGL_3DFX_multisample ------------------------- */ | 126 /* -------------------------- WGL_3DFX_multisample ------------------------- */ |
91 | 127 |
92 #ifndef WGL_3DFX_multisample | 128 #ifndef WGL_3DFX_multisample |
93 #define WGL_3DFX_multisample 1 | 129 #define WGL_3DFX_multisample 1 |
94 | 130 |
95 #define WGL_SAMPLE_BUFFERS_3DFX 0x2060 | 131 #define WGL_SAMPLE_BUFFERS_3DFX 0x2060 |
96 #define WGL_SAMPLES_3DFX 0x2061 | 132 #define WGL_SAMPLES_3DFX 0x2061 |
97 | 133 |
98 #define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample) | 134 #define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample) |
99 | 135 |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 #define WGLEW_EXPORT | 996 #define WGLEW_EXPORT |
961 #else | 997 #else |
962 #define WGLEW_EXPORT GLEWAPI | 998 #define WGLEW_EXPORT GLEWAPI |
963 #endif /* GLEW_MX */ | 999 #endif /* GLEW_MX */ |
964 | 1000 |
965 #ifdef GLEW_MX | 1001 #ifdef GLEW_MX |
966 struct WGLEWContextStruct | 1002 struct WGLEWContextStruct |
967 { | 1003 { |
968 #endif /* GLEW_MX */ | 1004 #endif /* GLEW_MX */ |
969 | 1005 |
| 1006 WGLEW_EXPORT PFNWGLCOPYCONTEXTPROC __wglewCopyContext; |
| 1007 WGLEW_EXPORT PFNWGLCREATECONTEXTPROC __wglewCreateContext; |
| 1008 WGLEW_EXPORT PFNWGLCREATELAYERCONTEXTPROC __wglewCreateLayerContext; |
| 1009 WGLEW_EXPORT PFNWGLDELETECONTEXTPROC __wglewDeleteContext; |
| 1010 WGLEW_EXPORT PFNWGLGETCURRENTCONTEXTPROC __wglewGetCurrentContext; |
| 1011 WGLEW_EXPORT PFNWGLGETCURRENTDCPROC __wglewGetCurrentDC; |
| 1012 WGLEW_EXPORT PFNWGLGETPROCADDRESSPROC __wglewGetProcAddress; |
| 1013 WGLEW_EXPORT PFNWGLMAKECURRENTPROC __wglewMakeCurrent; |
| 1014 WGLEW_EXPORT PFNWGLSHARELISTSPROC __wglewShareLists; |
| 1015 WGLEW_EXPORT PFNSWAPBUFFERSPROC __wglewSwapBuffers; |
| 1016 |
970 WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; | 1017 WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; |
971 | 1018 |
972 WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; | 1019 WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; |
973 WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; | 1020 WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; |
974 WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; | 1021 WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; |
975 WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; | 1022 WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; |
976 | 1023 |
977 WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; | 1024 WGLEW_EXPORT PFNWGLCREATECONTEXTATTRIBSARBPROC __wglewCreateContextAttribsARB; |
978 | 1025 |
979 WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; | 1026 WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) | 1190 #define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) |
1144 | 1191 |
1145 #define WGLEW_GET_VAR(x) (*(const GLboolean*)&(wglewGetContext()->x)) | 1192 #define WGLEW_GET_VAR(x) (*(const GLboolean*)&(wglewGetContext()->x)) |
1146 #define WGLEW_GET_FUN(x) wglewGetContext()->x | 1193 #define WGLEW_GET_FUN(x) wglewGetContext()->x |
1147 | 1194 |
1148 #else /* GLEW_MX */ | 1195 #else /* GLEW_MX */ |
1149 | 1196 |
1150 #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) | 1197 #define WGLEW_GET_VAR(x) (*(const GLboolean*)&x) |
1151 #define WGLEW_GET_FUN(x) x | 1198 #define WGLEW_GET_FUN(x) x |
1152 | 1199 |
| 1200 GLEWAPI GLboolean wglewInit(); |
1153 GLEWAPI GLboolean wglewIsSupported (const char* name); | 1201 GLEWAPI GLboolean wglewIsSupported (const char* name); |
1154 | 1202 |
1155 #endif /* GLEW_MX */ | 1203 #endif /* GLEW_MX */ |
1156 | 1204 |
1157 GLEWAPI GLboolean wglewGetExtension (const char* name); | 1205 GLEWAPI GLboolean wglewGetExtension (const char* name); |
1158 | 1206 |
1159 #ifdef __cplusplus | 1207 #ifdef __cplusplus |
1160 } | 1208 } |
1161 #endif | 1209 #endif |
1162 | 1210 |
1163 #undef GLEWAPI | 1211 #undef GLEWAPI |
1164 | 1212 |
1165 #endif /* __wglew_h__ */ | 1213 #endif /* __wglew_h__ */ |
OLD | NEW |