Generic interface for reading frame buffer data.
More...
#include <IFrameBufferProcessor.h>
|
virtual bool | GetPixelLine (const unsigned int y, const unsigned int x_start, const unsigned int num_pixels, BMM_Color_fl *const target_pixels)=0 |
| Reads a subset of a single line of the frame buffer. More...
|
|
virtual IPoint2 | GetResolution () const =0 |
| Returns the resolution of the frame buffer being abstracted by this class. More...
|
|
virtual Box2 | GetRegion () const =0 |
| Returns the region, within the frame buffer, which can be read. More...
|
|
Generic interface for reading frame buffer data.
This is the interface, used by IFrameBufferProcessor, for extracting the frame buffer data from the renderer's internal representation.
◆ ~IFrameBufferReader()
Protected destructor prevents deletion through this interface.
◆ GetPixelLine()
virtual bool GetPixelLine |
( |
const unsigned int |
y, |
|
|
const unsigned int |
x_start, |
|
|
const unsigned int |
num_pixels, |
|
|
BMM_Color_fl *const |
target_pixels |
|
) |
| |
|
pure virtual |
Reads a subset of a single line of the frame buffer.
- Parameters
-
y | The index of the frame buffer line to be read. |
x_start | The first pixel to be read, within the line. |
num_pixels | The number of pixels to be read, guaranteed to be within the bounds of the line. |
target_pixels | The buffer into which the pixels are to be written, allocated to store num_pixels pixels. |
- Returns
- True on success, false on failure to read to frame buffer for any reason.
◆ GetResolution()
virtual IPoint2 GetResolution |
( |
| ) |
const |
|
pure virtual |
Returns the resolution of the frame buffer being abstracted by this class.
This resolution bounds the range of valid pixel indices that may be accessed with GetPixelLine().
◆ GetRegion()
virtual Box2 GetRegion |
( |
| ) |
const |
|
pure virtual |
Returns the region, within the frame buffer, which can be read.
This is the region which has been rendered, which contains meaningful value. The caller should limit its frame buffer access to the pixel indices within the region returned here.