00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00022
00023
#ifndef __M3DCORE_PRESENTTARGET_H__
00024
#define __M3DCORE_PRESENTTARGET_H__
00025
00026
#include "../m3dbase.h"
00027
#include "../m3dtypes.h"
00028
00030 class IMuli3DPresentTarget :
public IBase
00031 {
00032
protected:
00034
virtual ~IMuli3DPresentTarget();
00035
00038
IMuli3DPresentTarget(
class CMuli3DDevice *i_pParent );
00039
00040
public:
00045
virtual result Create() = 0;
00046
00055
virtual result Present(
const float32 *i_pSource,
uint32 i_iFloats ) = 0;
00056
00058
class CMuli3DDevice *
pGetDevice();
00059
00060
protected:
00061 class CMuli3DDevice *
m_pParent;
00062 };
00063
00064
00065
00066
#ifdef WIN32
00067
00068
#include <ddraw.h>
00069
#pragma comment( lib, "ddraw.lib" )
00070
#pragma comment( lib, "dxguid.lib" )
00071
00073
class CMuli3DPresentTargetWin32 :
public IMuli3DPresentTarget
00074 {
00075
protected:
00076
virtual ~CMuli3DPresentTargetWin32();
00077
00078
friend class CMuli3DDevice;
00081 CMuli3DPresentTargetWin32(
class CMuli3DDevice *i_pParent );
00082
00083
public:
00088
result Create();
00089
00098
result Present(
const float32 *i_pSource,
uint32 i_iFloats );
00099
00100
private:
00105
void ProcessBits(
uint32 i_iMask,
uint16 &o_iLowBit,
uint16 &o_iNumBits );
00106
00107
private:
00108 LPDIRECTDRAW7 m_pDirectDraw;
00109 LPDIRECTDRAWCLIPPER m_pDirectDrawClipper;
00110 LPDIRECTDRAWSURFACE7 m_pDirectDrawSurfaces[2];
00111
bool m_bDDSurfaceLost;
00112
00113
uint16 m_i16bitMaxVal[3];
00114
uint16 m_i16bitShift[3];
00115 };
00116
00117
#endif
00118
00119
#ifdef LINUX_X11
00120
00122
class CMuli3DPresentTargetLinuxX11 :
public IMuli3DPresentTarget
00123 {
00124
protected:
00125
virtual ~CMuli3DPresentTargetLinuxX11();
00126
00127
friend class CMuli3DDevice;
00130 CMuli3DPresentTargetLinuxX11(
class CMuli3DDevice *i_pParent );
00131
00132
public:
00137
result Create();
00138
00147
result Present(
const float32 *i_pSource,
uint32 i_iFloats );
00148
00149
private:
00150 Display *m_pDisplay;
00151 GC m_WindowGC;
00152 XImage *m_pXImage;
00153
uint32 m_iPixelBytes;
00154
00155
uint16 m_i16bitMaxVal[3];
00156
uint16 m_i16bitShift[3];
00157 };
00158
00159
#endif
00160
00161
#ifdef __amigaos4__
00162
00164
class CMuli3DPresentTargetAmigaOS4 :
public IMuli3DPresentTarget
00165 {
00166
protected:
00167
virtual ~CMuli3DPresentTargetAmigaOS4();
00168
00169
friend class CMuli3DDevice;
00172 CMuli3DPresentTargetAmigaOS4(
class CMuli3DDevice *i_pParent );
00173
00174
public:
00179
result Create();
00180
00189
result Present(
const float32 *i_pSource,
uint32 i_iFloats );
00190
00191
private:
00192
struct BitMap *m_pBitMap;
00193 };
00194
00195
#endif
00196
00197
#endif // __M3DCORE_PRESENTTARGET_H__