21 #include <eq/client/api.h>
23 #include <lunchbox/os.h>
24 #include <lunchbox/types.h>
38 # include <X11/Xlib.h>
40 # ifndef GLX_SAMPLE_BUFFERS
41 # define GLX_SAMPLE_BUFFERS 100000
44 # define GLX_SAMPLES 100001
50 # define _WIN32_WINNT 0x501 // XP
55 # define Cursor CGLCursor // avoid name clash with X11 'Cursor'
56 # include <ApplicationServices/ApplicationServices.h>
58 # include <Carbon/Carbon.h>
59 # define EQ_AGL_MENUBARHEIGHT 22
60 # ifdef check // undo global namespace pollution (AssertMacros.h)
68 # ifndef WGL_NV_gpu_affinity
69 # define WGL_NV_gpu_affinity 1
70 DECLARE_HANDLE(HGPUNV);
74 CHAR DeviceString[128];
79 # ifdef WGL_WGLEXT_PROTOTYPES
80 extern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);
81 extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
82 extern HDC WINAPI wglCreateAffinityDCNV (
const HGPUNV *pGpuList);
83 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
84 extern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);
86 typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);
87 typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
88 typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (
const HGPUNV *pGpuList);
89 typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
90 typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);
91 # endif // WGL_WGLEXT_PROTOTYPES
92 # endif // WGL_NV_gpu_affinity
94 #ifndef WGL_ARB_pbuffer
95 # define WGL_ARB_pbuffer 1
97 # define WGL_DRAW_TO_PBUFFER_ARB 0x202D
98 # define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
99 # define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
100 # define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
101 # define WGL_PBUFFER_LARGEST_ARB 0x2033
102 # define WGL_PBUFFER_WIDTH_ARB 0x2034
103 # define WGL_PBUFFER_HEIGHT_ARB 0x2035
104 # define WGL_PBUFFER_LOST_ARB 0x2036
106 DECLARE_HANDLE(HPBUFFERARB);
108 typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
const int* piAttribList);
109 typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
110 typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
111 typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer,
int iAttribute,
int* piValue);
112 typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
114 # define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB)
115 # define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB)
116 # define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB)
117 # define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB)
118 # define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB)
120 # define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer)
128 typedef void* HPBUFFERARB;
130 # define PFNWGLDELETEDCNVPROC void*
Includes OpenGL and GLEW headers.