00001
00068 #ifndef INC_MI32_RENDERBUFFER_H
00069 #define INC_MI32_RENDERBUFFER_H
00070
00071 #ifndef INC_MI32_RECT_H
00072 #include <mi32/rect.h>
00073 #endif
00074
00075 #ifndef INC_MI32_COLORSPC_H
00076 #include <mi32/colorspc.h>
00077 #endif
00078
00079 #ifndef INC_MI32_STEREODEVICE_H
00080 #include <mi32/stereodevice.h>
00081 #endif
00082
00083
00084 namespace MGD {
00085 class DEVICE;
00086 class DEVICE_MEM32RGBA;
00087 }
00088
00089
00090
00093 class RENDERBUFFER {
00094 public:
00095
00097 static COLORSPACE GetTargetColorSpace (
00098 const MGD::DEVICE *pDeviceRef
00099 );
00100
00102 RENDERBUFFER ();
00103
00105 ~RENDERBUFFER ();
00106
00110 ERRVALUE CopyFromDevice (
00111 const MGD::DEVICE_MEM32RGBA *pDevSource,
00112 bool UseMinimalRectangle,
00113 bool CopyDepth = false
00114 );
00115
00119 ERRVALUE CopyFromDevice (
00120 const MGD::DEVICE_MEM32RGBA *pDevSource,
00121 UINT16 FrameBuffer,
00122 bool UseMinimalRectangle,
00123 bool CopyDepth = false
00124 );
00125
00127 void DestroyDevice ();
00128
00130 void Erase ();
00131
00134 MGD::DEVICE* GetDevice ();
00135
00138 const MGD::DEVICE* GetDevice () const;
00139
00141 bool HasRendered (
00142 ) const { return (m_pDevice != 0 && m_HasRendered); }
00143
00145 ERRVALUE InterlaceFromDevice (
00146 MGD::DEVICE_MEM32RGBA *pDevSource,
00147 const LRECT2D& SrcRectLeft,
00148 const LRECT2D& SrcRectRight,
00149 STEREODEVICE::METHOD StereoMode,
00150 bool UseMinimalRectangle = true
00151 );
00152
00156 void OverlayOnDevice (
00157 MGD::DEVICE *pDevTarget,
00158 const LRECT2D *pClipRectTgt = 0,
00159 const LPOINT2D *pPointTgt = 0,
00160 UINT8 MaskRed = 255,
00161 UINT8 MaskGreen = 255,
00162 UINT8 MaskBlue = 255
00163 ) const;
00164
00168 void OverlayOnDevice (
00169 MGD::DEVICE *pDevTarget,
00170 UINT16 FrameBufferTgt,
00171 const LRECT2D *pClipRectTgt = 0,
00172 const LPOINT2D *pPointTgt = 0,
00173 UINT8 MaskRed = 255,
00174 UINT8 MaskGreen = 255,
00175 UINT8 MaskBlue = 255
00176 ) const;
00177
00179 void SetRendered (
00180 bool bHasRendered
00181 ) { m_HasRendered = bHasRendered; }
00182
00186 ERRVALUE SetupDevice (
00187 const MGD::DEVICE *pDeviceRef,
00188 INT32 width = 0,
00189 INT32 height = 0,
00190 UINT16 NumFrameBuffers = 1
00191 );
00192
00193 private:
00194 #ifndef GENERATING_DOXYGEN_OUTPUT
00195 MGD::DEVICE_MEM32RGBA *m_pDevice;
00196 LRECT2D m_ValidRect;
00197 bool m_HasRendered;
00198
00199 void CopyRect (
00200 MGD::DEVICE *pDevTarget,
00201 const MGD::DEVICE *pDevSource,
00202 UINT16 FrameBuffer,
00203 bool UseTransp,
00204 bool UseDepth,
00205 const LRECT2D *pClipRectTgt = 0,
00206 const LPOINT2D *pPointTgt = 0,
00207 UINT8 MaskRed = 255,
00208 UINT8 MaskGreen = 255,
00209 UINT8 MaskBlue = 255
00210 ) const;
00211
00212
00213 RENDERBUFFER (const RENDERBUFFER&);
00214 RENDERBUFFER& operator= (const RENDERBUFFER&);
00215
00216 #endif // GENERATING_DOXYGEN_OUTPUT
00217 };
00218
00219
00220
00221
00222 #endif // INC_MI32_RENDERBUFFER_H