23 #include <lunchbox/os.h> 24 #include <lunchbox/types.h> 40 #ifndef GLX_SAMPLE_BUFFERS 41 #define GLX_SAMPLE_BUFFERS 100000 44 #define GLX_SAMPLES 100001 50 #define _WIN32_WINNT 0x501 // XP 55 #ifdef __LP64__ // AGL is not supported in 64 bit 58 #define Cursor CGLCursor // avoid name clash with X11 'Cursor' 60 #include <ApplicationServices/ApplicationServices.h> 61 #include <Carbon/Carbon.h> 62 #define EQ_AGL_MENUBARHEIGHT 22 63 #ifdef check // undo global namespace pollution (AssertMacros.h) 72 #ifndef WGL_NV_gpu_affinity 73 #define WGL_NV_gpu_affinity 1 74 DECLARE_HANDLE(HGPUNV);
75 typedef struct _GPU_DEVICE
79 CHAR DeviceString[128];
82 } GPU_DEVICE, *PGPU_DEVICE;
84 #ifdef WGL_WGLEXT_PROTOTYPES 85 extern BOOL WINAPI wglEnumGpusNV(UINT iIndex, HGPUNV* hGpu);
86 extern BOOL WINAPI wglEnumGpuDevicesNV(HGPUNV hGpu, UINT iIndex,
87 PGPU_DEVICE pGpuDevice);
88 extern HDC WINAPI wglCreateAffinityDCNV(
const HGPUNV* pGpuList);
89 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV(HDC hAffinityDC, UINT iIndex,
91 extern BOOL WINAPI wglDeleteDCNV(HDC hAffinityDC);
93 typedef BOOL(WINAPI* PFNWGLENUMGPUSNVPROC)(UINT iIndex, HGPUNV* hGpu);
94 typedef BOOL(WINAPI* PFNWGLENUMGPUDEVICESNVPROC)(HGPUNV hGpu, UINT iIndex,
95 PGPU_DEVICE pGpuDevice);
96 typedef HDC(WINAPI* PFNWGLCREATEAFFINITYDCNVPROC)(
const HGPUNV* pGpuList);
97 typedef BOOL(WINAPI* PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)(HDC hAffinityDC,
100 typedef BOOL(WINAPI* PFNWGLDELETEDCNVPROC)(HDC hAffinityDC);
101 #endif // WGL_WGLEXT_PROTOTYPES 102 #endif // WGL_NV_gpu_affinity 104 #ifndef WGL_ARB_pbuffer 105 #define WGL_ARB_pbuffer 1 107 #define WGL_DRAW_TO_PBUFFER_ARB 0x202D 108 #define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E 109 #define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F 110 #define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 111 #define WGL_PBUFFER_LARGEST_ARB 0x2033 112 #define WGL_PBUFFER_WIDTH_ARB 0x2034 113 #define WGL_PBUFFER_HEIGHT_ARB 0x2035 114 #define WGL_PBUFFER_LOST_ARB 0x2036 116 DECLARE_HANDLE(HPBUFFERARB);
118 typedef HPBUFFERARB(WINAPI* PFNWGLCREATEPBUFFERARBPROC)(
119 HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
120 const int* piAttribList);
121 typedef BOOL(WINAPI* PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB hPbuffer);
122 typedef HDC(WINAPI* PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer);
123 typedef BOOL(WINAPI* PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB hPbuffer,
124 int iAttribute,
int* piValue);
125 typedef int(WINAPI* PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer,
128 #define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB) 129 #define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB) 130 #define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB) 131 #define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB) 132 #define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB) 134 #define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer) 142 typedef void* HPBUFFERARB;
144 #define PFNWGLDELETEDCNVPROC void* Includes OpenGL and GLEW headers.