Method | Description | |
---|---|---|
AddDrawCalls ( int count ) : void |
Raises the number of draw calls by a specific value. Call this method in custom render methods to keep the statistics display in sync.
|
|
ApplyBlendMode ( bool premultipliedAlpha ) : void |
Activates the current blend mode.
|
|
BatchQuad ( Quad quad ) : void |
Adds a quad or image to the current batch of unrendered quads. If there is a state change, all previous quads are rendered at once, and the batch is reset. Note that the values for alpha and blend mode are taken from the current render state, not the quad.
|
|
CheckForOpenGLError ( ) : uint |
Checks for an OpenGL error. If there is one, it is logged an the error code is returned.
|
|
Clear ( uint color, float alpha = 0.0f ) : void |
Clears OpenGL's color buffer with a specified color.
|
|
FinishQuadBatch ( ) : void |
Renders the current quad batch and resets it.
|
|
NextFrame ( ) : void |
Resets the render state stack to the default.
|
|
PopClipRect ( ) : void |
Restores the clipping rectangle that was last pushed to the stack.
|
|
PopState ( ) : void |
Restores the previous render state.
|
|
PurgeBuffers ( ) : void |
Clears all vertex and index buffers, releasing the associated memory. Useful in low-memory situations. Don't call from within a render method!
|
|
PushClipRect ( |
The clipping rectangle can be used to limit rendering in the current render target to a certain area. This method expects the rectangle in stage coordinates. Internally, it uses the 'glScissor' command of OpenGL, which works with pixel coordinates. Any pushed rectangle is intersected with the previous rectangle; the method returns that intersection.
|
|
PushState ( Matrix matrix, float alpha, uint blendMode ) : void |
Adds a new render state to the stack. The passed matrix is prepended to the modelview matrix; the alpha value is multiplied with the current alpha; the blend mode replaces the existing mode (except 'BlendMode.Auto', which will cause the current mode to prevail).
|
|
RenderSupport ( ) : System | ||
SetupOrthographicProjection ( float left, float right, float top, float bottom ) : void |
Sets up the projection matrix for ortographic 2D rendering.
|
Method | Description | |
---|---|---|
ApplyClipRect ( ) : void |
Updates the scissor rectangle using the current clipping rectangle. This method is called automatically when either the projection matrix or the clipping rectangle changes.
|
public ApplyBlendMode ( bool premultipliedAlpha ) : void | ||
premultipliedAlpha | bool | |
return | void |
public Clear ( uint color, float alpha = 0.0f ) : void | ||
color | uint | |
alpha | float | |
return | void |
public PushClipRect ( |
||
clipRect | ||
return |
public PushState ( Matrix matrix, float alpha, uint blendMode ) : void | ||
matrix | Matrix | |
alpha | float | |
blendMode | uint | |
return | void |
public SetupOrthographicProjection ( float left, float right, float top, float bottom ) : void | ||
left | float | |
right | float | |
top | float | |
bottom | float | |
return | void |