Equalizer  1.2.1
eq/client/os.h
Go to the documentation of this file.
00001 
00002 /* Copyright (c) 2006-2011, 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 <co/base/os.h>
00024 #include <co/base/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 #  ifdef EQ_USE_MAGELLAN
00051 #    define _WIN32_WINNT 0x501 // XP
00052 #  else
00053 #    define _WIN32_WINNT 0x500 // 2000
00054 #  endif
00055 #endif
00056 #endif
00057 
00058 #ifdef AGL
00059 #  if defined(__i386__) // WAR compile error
00060 #    undef Status 
00061 #  endif
00062 #  define Cursor CGLCursor   // avoid name clash with X11 'Cursor'
00063 #  include <ApplicationServices/ApplicationServices.h>
00064 #  include <AGL/agl.h>
00065 #  include <Carbon/Carbon.h>
00066 #  define EQ_AGL_MENUBARHEIGHT 22
00067 #  ifdef check // undo global namespace pollution (AssertMacros.h)
00068 #    undef check
00069 #  endif
00070 #endif
00071 
00072 #ifdef WGL
00073 #  include <wingdi.h>
00074 
00075 #  ifndef WGL_ARB_pbuffer
00076 typedef void* HPBUFFERARB;
00077 #  endif
00078 
00079 #  ifndef WGL_NV_gpu_affinity
00080 #    define WGL_NV_gpu_affinity 1
00081 DECLARE_HANDLE(HGPUNV);
00082 typedef struct _GPU_DEVICE {
00083     DWORD  cb;
00084     CHAR   DeviceName[32];
00085     CHAR   DeviceString[128];
00086     DWORD  Flags;
00087     RECT   rcVirtualScreen;
00088 } GPU_DEVICE, *PGPU_DEVICE;
00089 
00090 #    ifdef WGL_WGLEXT_PROTOTYPES
00091 extern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);
00092 extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00093 extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *pGpuList);
00094 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00095 extern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);
00096 #    else
00097 typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);
00098 typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00099 typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *pGpuList);
00100 typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00101 typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);
00102 #    endif // WGL_WGLEXT_PROTOTYPES
00103 #  endif // WGL_NV_gpu_affinity
00104 #endif
00105 
00106 #ifndef WGL
00107 typedef void* HDC;
00108 typedef void* HWND;
00109 typedef void* HPBUFFERARB;
00110 typedef void* HGLRC;
00111 #  define PFNWGLDELETEDCNVPROC void*
00112 #  define WINAPI
00113 #endif
00114 
00116 #endif // EQ_OS_H
00117 
Generated on Fri Jun 8 2012 15:44:32 for Equalizer 1.2.1 by  doxygen 1.8.0