00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00022
00023
#ifndef __M3DCORE_SURFACE_H__
00024
#define __M3DCORE_SURFACE_H__
00025
00026
#include "../m3dbase.h"
00027
#include "../m3dtypes.h"
00028
00030 class CMuli3DSurface :
public IBase
00031 {
00032
protected:
00033
~CMuli3DSurface();
00034
00035
friend class CMuli3DDevice;
00038
CMuli3DSurface(
class CMuli3DDevice *i_pParent );
00039
00048
result Create(
uint32 i_iWidth,
uint32 i_iHeight,
m3dformat i_fmtFormat );
00049
00050
public:
00055
void SamplePoint( vector4 &o_vColor,
float32 i_fU,
float32 i_fV );
00056
00061
void SampleLinear( vector4 &o_vColor,
float32 i_fU,
float32 i_fV );
00062
00068
result Clear(
const vector4 &i_vColor,
const m3drect *i_pRect );
00069
00078
result CopyToSurface(
const m3drect *i_pSrcRect,
CMuli3DSurface *i_pDestSurface,
00079
const m3drect *i_pDestRect,
m3dtexturefilter i_Filter );
00080
00089
result LockRect(
void **o_ppData,
const m3drect *i_pRect );
00090
00094
result UnlockRect();
00095
00096
m3dformat fmtGetFormat();
00097
uint32 iGetFormatFloats();
00098
00099
uint32 iGetWidth();
00100
uint32 iGetHeight();
00101
00103
class CMuli3DDevice *
pGetDevice();
00104
00105
private:
00106
class CMuli3DDevice *m_pParent;
00107
00108
m3dformat m_fmtFormat;
00109
uint32 m_iWidth;
00110
uint32 m_iHeight;
00111
uint32 m_iWidthMin1;
00112
uint32 m_iHeightMin1;
00113
00114
bool m_bLockedComplete;
00115
m3drect m_PartialLockRect;
00116
float32 *m_pPartialLockData;
00117
00118
float32 *m_pData;
00119 };
00120
00121
#endif // __M3DCORE_SURFACE_H__