Equalizer  1.3.1-git
eq/client/os.h
Go to the documentation of this file.
00001 
00002 /* Copyright (c) 2006-2012, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQ_OS_H
00019 #define EQ_OS_H
00020 
00021 #include <eq/client/api.h>
00022 #include <eq/client/gl.h>
00023 #include <lunchbox/os.h>
00024 #include <lunchbox/types.h>
00025 
00026 #include <string>
00027 
00037 #ifdef GLX
00038 #  include <X11/Xlib.h>
00039 #  include <GL/glx.h>
00040 #  ifndef GLX_SAMPLE_BUFFERS
00041 #    define GLX_SAMPLE_BUFFERS 100000
00042 #  endif
00043 #  ifndef GLX_SAMPLES
00044 #    define GLX_SAMPLES 100001
00045 #  endif
00046 #endif
00047 
00048 #ifdef _WIN32
00049 #ifndef _WIN32_WINNT
00050 #  define _WIN32_WINNT 0x501 // XP
00051 #endif
00052 #endif
00053 
00054 #ifdef AGL
00055 #  define Cursor CGLCursor   // avoid name clash with X11 'Cursor'
00056 #  include <ApplicationServices/ApplicationServices.h>
00057 #  include <AGL/agl.h>
00058 #  include <Carbon/Carbon.h>
00059 #  define EQ_AGL_MENUBARHEIGHT 22
00060 #  ifdef check // undo global namespace pollution (AssertMacros.h)
00061 #    undef check
00062 #  endif
00063 #endif
00064 
00065 #ifdef WGL
00066 #  include <wingdi.h>
00067 
00068 #  ifndef WGL_ARB_pbuffer
00069 typedef void* HPBUFFERARB;
00070 #  endif
00071 
00072 #  ifndef WGL_NV_gpu_affinity
00073 #    define WGL_NV_gpu_affinity 1
00074 DECLARE_HANDLE(HGPUNV);
00075 typedef struct _GPU_DEVICE {
00076     DWORD  cb;
00077     CHAR   DeviceName[32];
00078     CHAR   DeviceString[128];
00079     DWORD  Flags;
00080     RECT   rcVirtualScreen;
00081 } GPU_DEVICE, *PGPU_DEVICE;
00082 
00083 #    ifdef WGL_WGLEXT_PROTOTYPES
00084 extern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);
00085 extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00086 extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *pGpuList);
00087 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00088 extern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);
00089 #    else
00090 typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);
00091 typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00092 typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *pGpuList);
00093 typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00094 typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);
00095 #    endif // WGL_WGLEXT_PROTOTYPES
00096 #  endif // WGL_NV_gpu_affinity
00097 #endif
00098 
00099 #ifndef WGL
00100 typedef void* HDC;
00101 typedef void* HWND;
00102 typedef void* HPBUFFERARB;
00103 typedef void* HGLRC;
00104 #  define PFNWGLDELETEDCNVPROC void*
00105 #  define WINAPI
00106 #endif
00107 
00109 #endif // EQ_OS_H
00110 
Generated on Tue May 1 2012 15:14:28 for Equalizer 1.3.1-git by  doxygen 1.8.0