00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef INC_MI32_RENDERBUFFER_H
00031 #define INC_MI32_RENDERBUFFER_H
00032
00033 #ifndef INC_MI32_RECT_H
00034 #include <mi32/rect.h>
00035 #endif
00036
00037 #ifndef INC_MI32_COLORSPC_H
00038 #include <mi32/colorspc.h>
00039 #endif
00040
00041 #ifndef INC_MI32_MXSTEREO_H
00042 #include <mi32/mxstereo.h>
00043 #endif
00044
00045
00046 namespace MGD {
00047 class DEVICE;
00048 class DEVICE_MEM32RGBA;
00049 }
00050
00051
00052
00053
00054
00055 class RENDERBUFFER {
00056 public:
00057
00058
00059 static COLORSPACE GetTargetColorSpace (
00060 const MGD::DEVICE *pDeviceRef
00061 );
00062
00063
00064 RENDERBUFFER ();
00065
00066
00067 ~RENDERBUFFER ();
00068
00069
00070
00071
00072 ERRVALUE CopyFromDevice (
00073 const MGD::DEVICE_MEM32RGBA *pDevSource,
00074 bool UseMinimalRectangle = true,
00075 bool CopyDepth = false
00076 );
00077
00078
00079 void DestroyDevice (
00080 );
00081
00082
00083
00084 MGD::DEVICE* GetDevice (
00085 );
00086
00087
00088
00089 const MGD::DEVICE* GetDevice (
00090 ) const;
00091
00092
00093 bool HasRendered (
00094 ) const { return (m_pDevice != 0 && m_HasRendered); }
00095
00096
00097 ERRVALUE InterlaceFromDevice (
00098 MGD::DEVICE_MEM32RGBA *pDevSource,
00099 const LRECT2D& SrcRectLeft,
00100 const LRECT2D& SrcRectRight,
00101 STEREOMODE StereoMode,
00102 bool UseMinimalRectangle = true
00103 );
00104
00105
00106 void OverlayOnDevice (
00107 MGD::DEVICE *pDevTarget,
00108 const LRECT2D *pClipRect = 0
00109 ) const;
00110
00111
00112 void SetPlaneMaskAll (
00113 ) { m_MaskRed = m_MaskGreen = m_MaskBlue = 255; }
00114
00115
00116 void SetPlaneMaskRGB (
00117 UINT8 MaskRed,
00118 UINT8 MaskGreen,
00119 UINT8 MaskBlue
00120 ) { m_MaskRed = MaskRed; m_MaskGreen = MaskGreen; m_MaskBlue = MaskBlue; }
00121
00122
00123 void SetRendered (
00124 bool HasRendered
00125 ) { m_HasRendered = HasRendered; }
00126
00127
00128
00129
00130 ERRVALUE SetupDevice (
00131 const MGD::DEVICE *pDeviceRef
00132 );
00133
00134 private:
00135 #ifndef GENERATING_DOXYGEN_OUTPUT
00136 MGD::DEVICE_MEM32RGBA *m_pDevice;
00137 bool m_HasRendered;
00138 LRECT2D m_ValidRect;
00139 UINT8 m_MaskRed;
00140 UINT8 m_MaskGreen;
00141 UINT8 m_MaskBlue;
00142
00143 void CopyRect (MGD::DEVICE *pDevTarget, const MGD::DEVICE *pDevSource, bool UseTransp, const LRECT2D *pClipRect) const;
00144 void CopyDepthRect (MGD::DEVICE *pDevTarget, const MGD::DEVICE *pDevSource, const LRECT2D *pClipRect) const;
00145
00146
00147 RENDERBUFFER (const RENDERBUFFER&);
00148 RENDERBUFFER& operator= (const RENDERBUFFER&);
00149
00150 #endif // GENERATING_DOXYGEN_OUTPUT
00151 };
00152
00153
00154
00155
00156 #endif // INC_MI32_RENDERBUFFER_H