Equalizer 1.0

eq/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/api.h>
00022 #include <eq/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 #endif
00068 
00069 #ifdef WGL
00070 #  include <wingdi.h>
00071 
00072 #  ifndef WGL_ARB_pbuffer
00073 typedef void* HPBUFFERARB;
00074 #  endif
00075 
00076 #  ifndef WGL_NV_gpu_affinity
00077 #    define WGL_NV_gpu_affinity 1
00078 DECLARE_HANDLE(HGPUNV);
00079 typedef struct _GPU_DEVICE {
00080     DWORD  cb;
00081     CHAR   DeviceName[32];
00082     CHAR   DeviceString[128];
00083     DWORD  Flags;
00084     RECT   rcVirtualScreen;
00085 } GPU_DEVICE, *PGPU_DEVICE;
00086 
00087 #    ifdef WGL_WGLEXT_PROTOTYPES
00088 extern BOOL WINAPI wglEnumGpusNV (UINT iIndex, HGPUNV *hGpu);
00089 extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00090 extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *pGpuList);
00091 extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00092 extern BOOL WINAPI wglDeleteDCNV (HDC hAffinityDC);
00093 #    else
00094 typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iIndex, HGPUNV *hGpu);
00095 typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iIndex, PGPU_DEVICE pGpuDevice);
00096 typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *pGpuList);
00097 typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iIndex, HGPUNV *hGpu);
00098 typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hAffinityDC);
00099 #    endif // WGL_WGLEXT_PROTOTYPES
00100 #  endif // WGL_NV_gpu_affinity
00101 #endif
00102 
00103 #ifndef WGL
00104 typedef void* HDC;
00105 typedef void* HWND;
00106 typedef void* HPBUFFERARB;
00107 typedef void* HGLRC;
00108 #  define PFNWGLDELETEDCNVPROC void*
00109 #  define WINAPI
00110 #endif
00111 
00113 #endif // EQ_OS_H
00114 
Generated on Sun May 8 2011 19:11:07 for Equalizer 1.0 by  doxygen 1.7.3