Equalizer  1.4.1
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_NV_gpu_affinity
00069 #    define WGL_NV_gpu_affinity 1
00070 DECLARE_HANDLE(HGPUNV);
00071 typedef struct _GPU_DEVICE {
00072     DWORD  cb;
00073     CHAR   DeviceName[32];
00074     CHAR   DeviceString[128];
00075     DWORD  Flags;
00076     RECT   rcVirtualScreen;
00077 } GPU_DEVICE, *PGPU_DEVICE;
00078 
00079 #    ifdef WGL_WGLEXT_PROTOTYPES
00080 extern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);
00081 extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00082 extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *pGpuList);
00083 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00084 extern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);
00085 #    else
00086 typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);
00087 typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00088 typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *pGpuList);
00089 typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00090 typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);
00091 #    endif // WGL_WGLEXT_PROTOTYPES
00092 #  endif // WGL_NV_gpu_affinity
00093 #endif
00094 
00095 #ifndef WGL
00096 typedef void* HDC;
00097 typedef void* HWND;
00098 typedef void* HPBUFFERARB;
00099 typedef void* HGLRC;
00100 #  define PFNWGLDELETEDCNVPROC void*
00101 #  define WINAPI
00102 #endif
00103 
00105 #endif // EQ_OS_H
00106 
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1