Render surface interface. More...
Public Types | |
enum | BufferPolicy { DontCare, Required, RequiredAndDegradable } |
Buffer definition policy. More... | |
enum | BufferType { Color = 0x0001, Depth = 0x0002, Stencil = 0x0004, Multisample = 0x0008, Double = 0x0010, Stereo = 0x0020 } |
Buffer definitions. More... | |
Public Member Functions | |
void | Clear (RenderContext ctx) |
Clear all Surface buffers. | |
void | DefineColorBuffer (int bits, BufferPolicy policy) |
Define RenderSurface color buffer. | |
void | DefineDepthBuffer (int bits, BufferPolicy policy) |
Define RenderSurface depth buffer. | |
void | DefineDoubleBuffers (bool flag, BufferPolicy policy) |
Define double buffered RenderSurface. | |
void | DefineMultisampleBuffer (int bits, BufferPolicy policy) |
Define RenderSurface multisample buffer. | |
void | DefineStencilBuffer (int bits, BufferPolicy policy) |
Define RenderSurface depth buffer. | |
void | DefineStereoBuffers (bool flag, BufferPolicy policy) |
Define double buffered RenderSurface. | |
BufferType | GetClearBuffers () |
abstract IntPtr | GetDeviceContext () |
Obtain device context associated with this RenderSurface. | |
bool | HasBuffer (BufferType sBuffer) |
Determine whether this RenderSurface has allocated a certain buffer. | |
abstract void | SwapSurface () |
Swap render surface. | |
Static Public Member Functions | |
static void | Clear (RenderContext ctx, BufferType bTypes) |
Clear specified Surface buffers. | |
Protected Member Functions | |
RenderSurface (int w, int h) | |
RenderSurface constructor. | |
RenderContext.PixelFormat | ChoosePixelFormat (IntPtr rDevice) |
Obtain best macthing surface configuration supported by actual implementation. | |
bool | IsDegradableBuffer (BufferType sBuffer) |
Determine whether a RenderSurface buffer is degradable. | |
bool | IsIgnoredBuffer (BufferType sBuffer) |
Determine whether a buffer was requested. | |
bool | IsRequiredBuffer (BufferType sBuffer) |
Determine whether a RenderSurface buffer is required. | |
void | SetBufferConfiguration (RenderContext.PixelFormat pFormat) |
Confirm pixel format assigned to this surface. | |
abstract bool | ValidPixelFormat (RenderContext.PixelFormat pFormat) |
Derived implementation status for passing surface pixel format. | |
Protected Attributes | |
bool | mSizeChanged = true |
Flag indicating whether surface extents are changed. | |
Properties | |
float | AspectRatio [get] |
RenderSurface aspect ratio property. | |
int | ColorBits [get] |
Obtain RenderSurface color buffer format. | |
int | DepthBits [get] |
bool | DoubleBuffers [get] |
bool | ExtentsChanged [get, set] |
Property for checking extents changes. | |
int | Height [get, set] |
RenderSurface height property. | |
int | MultisampleBits [get] |
int | StencilBits [get] |
bool | StereoBuffers [get] |
abstract bool | Swappable [get] |
Determine whether this surface has to be swapped. | |
int | Width [get, set] |
RenderSurface width property. |
Render surface interface.
A RenderSurface is able to store the result of a rendering operation. This class represents the final component of a RenderPipeline, but it could be used as data source for another RenderPipeline.
A RenderSurface is defined by a set of buffers; each buffer is defined by a type, which specify the how use the buffer contents. Each buffer type defines the available formats for data storage.
Buffer definition policy.
Buffer definitions.
This enumeration specify surface buffers available of each RenderSurface, or duplication of defined buffers for double buffering or stereoscopic buffers.
Derm.Render.RenderSurface.RenderSurface | ( | int | w, | |
int | h | |||
) | [protected] |
RenderSurface constructor.
w | A System.Int32 | |
h | A System.Int32 |
RenderContext.PixelFormat Derm.Render.RenderSurface.ChoosePixelFormat | ( | IntPtr | rDevice | ) | [protected] |
Obtain best macthing surface configuration supported by actual implementation.
rDevice | Surface device context. |
System.Exception | This exception is thrown when no pixel format was found for matching surface buffer configuration using the specified buffer policy. |
Each system offer a limited number of possible configuration, which has to be choosen to allocated correctly a system Surface. These pixel formats are fetched during the static constructor of RenderContext, and this routine selects one of the available pixel format.
static void Derm.Render.RenderSurface.Clear | ( | RenderContext | ctx, | |
BufferType | bTypes | |||
) | [static] |
Clear specified Surface buffers.
ctx | A RenderContext | |
bTypes | A System.Int32 |
void Derm.Render.RenderSurface.Clear | ( | RenderContext | ctx | ) |
Clear all Surface buffers.
ctx | A RenderContext |
void Derm.Render.RenderSurface.DefineColorBuffer | ( | int | bits, | |
BufferPolicy | policy | |||
) |
Define RenderSurface color buffer.
bits | A System.Int32 | |
policy | A BufferPolicy |
void Derm.Render.RenderSurface.DefineDepthBuffer | ( | int | bits, | |
BufferPolicy | policy | |||
) |
Define RenderSurface depth buffer.
bits | A System.Int32 | |
policy | A BufferPolicy |
void Derm.Render.RenderSurface.DefineDoubleBuffers | ( | bool | flag, | |
BufferPolicy | policy | |||
) |
Define double buffered RenderSurface.
flag | A System.Boolean | |
policy | A BufferPolicy |
void Derm.Render.RenderSurface.DefineMultisampleBuffer | ( | int | bits, | |
BufferPolicy | policy | |||
) |
Define RenderSurface multisample buffer.
bits | A System.Int32 | |
policy | A BufferPolicy |
void Derm.Render.RenderSurface.DefineStencilBuffer | ( | int | bits, | |
BufferPolicy | policy | |||
) |
Define RenderSurface depth buffer.
bits | A System.Int32 | |
policy | A BufferPolicy |
void Derm.Render.RenderSurface.DefineStereoBuffers | ( | bool | flag, | |
BufferPolicy | policy | |||
) |
Define double buffered RenderSurface.
flag | A System.Boolean | |
policy | A BufferPolicy |
BufferType Derm.Render.RenderSurface.GetClearBuffers | ( | ) |
abstract IntPtr Derm.Render.RenderSurface.GetDeviceContext | ( | ) | [pure virtual] |
Obtain device context associated with this RenderSurface.
Implemented in Derm.Render.RenderFramebuffer, and Derm.Render.RenderWindow.
bool Derm.Render.RenderSurface.HasBuffer | ( | BufferType | sBuffer | ) |
Determine whether this RenderSurface has allocated a certain buffer.
sBuffer | A System.Int32 which could be one of the following values:
|
bool Derm.Render.RenderSurface.IsDegradableBuffer | ( | BufferType | sBuffer | ) | [protected] |
Determine whether a RenderSurface buffer is degradable.
sBuffer | A System.Int32 which could be one of the following values:
|
bool Derm.Render.RenderSurface.IsIgnoredBuffer | ( | BufferType | sBuffer | ) | [protected] |
Determine whether a buffer was requested.
sBuffer | A System.Int32 which could be one of the following values:
|
bool Derm.Render.RenderSurface.IsRequiredBuffer | ( | BufferType | sBuffer | ) | [protected] |
Determine whether a RenderSurface buffer is required.
sBuffer | A System.Int32 which could be one of the following values:
|
void Derm.Render.RenderSurface.SetBufferConfiguration | ( | RenderContext.PixelFormat | pFormat | ) | [protected] |
Confirm pixel format assigned to this surface.
pFormat | A RenderContext.PixelFormat defining the available surface buffers and their definitions. |
This routine shall be called after a successfull call to SetPixelFormat.
abstract void Derm.Render.RenderSurface.SwapSurface | ( | ) | [pure virtual] |
Swap render surface.
Implemented in Derm.Render.RenderFramebuffer, and Derm.Render.RenderWindow.
abstract bool Derm.Render.RenderSurface.ValidPixelFormat | ( | RenderContext.PixelFormat | pFormat | ) | [protected, pure virtual] |
Derived implementation status for passing surface pixel format.
pFormat | A RenderContext.PixelFormat to be validated by derived implementation. |
Implemented in Derm.Render.RenderFramebuffer, and Derm.Render.RenderWindow.
bool Derm.Render.RenderSurface.mSizeChanged = true [protected] |
Flag indicating whether surface extents are changed.
float Derm.Render.RenderSurface.AspectRatio [get] |
RenderSurface aspect ratio property.
int Derm.Render.RenderSurface.ColorBits [get] |
Obtain RenderSurface color buffer format.
int Derm.Render.RenderSurface.DepthBits [get] |
bool Derm.Render.RenderSurface.DoubleBuffers [get] |
bool Derm.Render.RenderSurface.ExtentsChanged [get, set] |
Property for checking extents changes.
int Derm.Render.RenderSurface.Height [get, set] |
RenderSurface height property.
int Derm.Render.RenderSurface.MultisampleBits [get] |
int Derm.Render.RenderSurface.StencilBits [get] |
bool Derm.Render.RenderSurface.StereoBuffers [get] |
abstract bool Derm.Render.RenderSurface.Swappable [get] |
Determine whether this surface has to be swapped.
Reimplemented in Derm.Render.RenderFramebuffer, and Derm.Render.RenderWindow.
int Derm.Render.RenderSurface.Width [get, set] |
RenderSurface width property.