General memory-based rendering buffer. More...
#include <mi32/renderbuffer.h>
Public Member Functions | |
| RENDERBUFFER () | |
| ~RENDERBUFFER () | |
| ERRVALUE | CopyFromDevice (const MGD::DEVICE_MEM32RGBA *pDevSource, UINT16 FrameBuffer, bool UseMinimalRectangle, bool CopyDepth=false) |
| ERRVALUE | CopyFromDevice (const MGD::DEVICE_MEM32RGBA *pDevSource, bool UseMinimalRectangle, bool CopyDepth=false) |
| void | DestroyDevice () |
| void | Erase () |
| const MGD::DEVICE * | GetDevice () const |
| MGD::DEVICE * | GetDevice () |
| bool | HasRendered () const |
| ERRVALUE | InterlaceFromDevice (MGD::DEVICE_MEM32RGBA *pDevSource, const LRECT2D &SrcRectLeft, const LRECT2D &SrcRectRight, STEREODEVICE::METHOD StereoMode, bool UseMinimalRectangle=true) |
| void | OverlayOnDevice (MGD::DEVICE *pDevTarget, UINT16 FrameBufferTgt, const LRECT2D *pClipRectTgt=0, const LPOINT2D *pPointTgt=0, UINT8 MaskRed=255, UINT8 MaskGreen=255, UINT8 MaskBlue=255) const |
| void | OverlayOnDevice (MGD::DEVICE *pDevTarget, const LRECT2D *pClipRectTgt=0, const LPOINT2D *pPointTgt=0, UINT8 MaskRed=255, UINT8 MaskGreen=255, UINT8 MaskBlue=255) const |
| void | SetRendered (bool bHasRendered) |
| ERRVALUE | SetupDevice (const MGD::DEVICE *pDeviceRef, INT32 width=0, INT32 height=0, UINT16 NumFrameBuffers=1) |
Static Public Member Functions | |
| static COLORSPACE | GetTargetColorSpace (const MGD::DEVICE *pDeviceRef) |
General memory-based rendering buffer.
Supports creation/copying from and overlay on other MGD devices.
| RENDERBUFFER::RENDERBUFFER | ( | ) |
Constructor.
| RENDERBUFFER::~RENDERBUFFER | ( | ) |
Destructor.
| ERRVALUE RENDERBUFFER::CopyFromDevice | ( | const MGD::DEVICE_MEM32RGBA * | pDevSource, | |
| UINT16 | FrameBuffer, | |||
| bool | UseMinimalRectangle, | |||
| bool | CopyDepth = false | |||
| ) |
Copy rendering from specified source device using specified frame buffer.
Created device will have same (virtual) size and colorspace as source with single frame buffer. If successful will set as having been rendered.
| pDevSource | Source device to copy from | |
| FrameBuffer | Source frame buffer to copy | |
| UseMinimalRectangle | Use minimal rectangle |
| ERRVALUE RENDERBUFFER::CopyFromDevice | ( | const MGD::DEVICE_MEM32RGBA * | pDevSource, | |
| bool | UseMinimalRectangle, | |||
| bool | CopyDepth = false | |||
| ) |
Copy rendering from specified source device using all frame buffers.
Created device will have same (virtual) size, number of frame buffers and colorspace as source. If successful will set as having been rendered.
| pDevSource | Source device to copy from | |
| UseMinimalRectangle | Use minimal rectangle |
| void RENDERBUFFER::DestroyDevice | ( | ) |
Destroy device buffer if any.
| void RENDERBUFFER::Erase | ( | ) |
Erase buffer contents.
| const MGD::DEVICE* RENDERBUFFER::GetDevice | ( | ) | const |
Get rendering device (const).
| MGD::DEVICE* RENDERBUFFER::GetDevice | ( | ) |
Get rendering device (non-const).
| static COLORSPACE RENDERBUFFER::GetTargetColorSpace | ( | const MGD::DEVICE * | pDeviceRef | ) | [static] |
Get target colorspace suitable for overlay.
| pDeviceRef | Reference device |
| bool RENDERBUFFER::HasRendered | ( | ) | const [inline] |
Determine if has been rendered.
| ERRVALUE RENDERBUFFER::InterlaceFromDevice | ( | MGD::DEVICE_MEM32RGBA * | pDevSource, | |
| const LRECT2D & | SrcRectLeft, | |||
| const LRECT2D & | SrcRectRight, | |||
| STEREODEVICE::METHOD | StereoMode, | |||
| bool | UseMinimalRectangle = true | |||
| ) |
Interlace left/right stereo views.
| pDevSource | Source device to copy from | |
| SrcRectLeft | Source rectangle for left view | |
| SrcRectRight | Source rectangle for right view | |
| StereoMode | Stereo mode | |
| UseMinimalRectangle | Use minimal rectangle |
| void RENDERBUFFER::OverlayOnDevice | ( | MGD::DEVICE * | pDevTarget, | |
| UINT16 | FrameBufferTgt, | |||
| const LRECT2D * | pClipRectTgt = 0, |
|||
| const LPOINT2D * | pPointTgt = 0, |
|||
| UINT8 | MaskRed = 255, |
|||
| UINT8 | MaskGreen = 255, |
|||
| UINT8 | MaskBlue = 255 | |||
| ) | const |
Overlay rendered buffer on specified device using rectangle.
Will copy all frame buffers if target and buffer have same number, otherwise will only copy the first frame buffer.
| pDevTarget | Target device to overlay on | |
| FrameBufferTgt | Frame buffer on target device to copy to | |
| pClipRectTgt | Optional limiting rectangle in target device coordinates | |
| pPointTgt | Upper left target point |
| void RENDERBUFFER::OverlayOnDevice | ( | MGD::DEVICE * | pDevTarget, | |
| const LRECT2D * | pClipRectTgt = 0, |
|||
| const LPOINT2D * | pPointTgt = 0, |
|||
| UINT8 | MaskRed = 255, |
|||
| UINT8 | MaskGreen = 255, |
|||
| UINT8 | MaskBlue = 255 | |||
| ) | const |
Overlay rendered buffer on specified device using rectangle.
Will copy all frame buffers if target and buffer have same number, otherwise will only copy the first frame buffer.
| pDevTarget | Target device to overlay on | |
| pClipRectTgt | Optional limiting rectangle in target device coordinates | |
| pPointTgt | Upper left target point |
| void RENDERBUFFER::SetRendered | ( | bool | bHasRendered | ) | [inline] |
Set whether current rendering is valid or not.
| bHasRendered | True to mark as valid, false to mark as invalid |
| ERRVALUE RENDERBUFFER::SetupDevice | ( | const MGD::DEVICE * | pDeviceRef, | |
| INT32 | width = 0, |
|||
| INT32 | height = 0, |
|||
| UINT16 | NumFrameBuffers = 1 | |||
| ) |
Setup device.
Existing rendering will be lost. Created device will have same size and colorspace as specified reference.
| pDeviceRef | Reference device for determining size and colorspace | |
| width | Device width override if nonzero | |
| height | Device height override if nonzero | |
| NumFrameBuffers | Number of frame buffers, 0 to match reference device, typically 2 for stereo |
1.6.1