MOAIRenderMgr is responsible for drawing a list of MOAIRenderable objects. MOAIRenderable is the base class for any object that can be drawn. This includes MOAIProp and MOAILayer. To use MOAIRenderMgr pass a table of MOAIRenderable objects to MOAIRenderMgr.setRenderTable (). The table will usually be a stack of MOAILayer objects. The contents of the table will be rendered the next time a frame is drawn. Note that the table must be an array starting with index 1. Objects will be rendered counting from the base index until 'nil' is encountered. The render table may include other tables as entries. These must also be arrays indexed from 1.
Inherits MOAIGlobalClass< MOAIRenderMgr, MOAILuaObject >.
List of all members.
Function Documentation
Sets the render stack to nil. THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.
function clearRenderStack ()
- Returns:
- nil
Returns the number of draw calls last frame.
function getPerformanceDrawCount ()
- Returns:
- count ( number )
Returns the table currently being used for rendering.
function getRenderTable ()
- Returns:
- renderTable ( table )
Save the next frame rendered to.
function grabNextFrame ( MOAIImage image, function callback )
- Parameters:
-
| image | ( MOAIImage ) Image to save the backbuffer to |
| callback | ( function ) The function to execute when the frame has been saved into the image specified |
- Returns:
- renderTable ( table )
Pops the top renderable from the render stack. THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.
function popRenderPass ()
- Returns:
- nil
Pushes a renderable onto the render stack. THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.
function pushRenderPass ( MOAIRenderable renderable )
- Parameters:
-
- Returns:
- nil
Removes a renderable from the render stack. THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE.
function removeRenderPass ( MOAIRenderable renderable )
- Parameters:
-
- Returns:
- nil
Sets the table to be used for rendering. This should be an array indexed from 1 consisting of MOAIRenderable objects and sub-tables. Objects will be rendered in order starting from index 1 and continuing until 'nil' is encountered.
function setRenderTable ( table renderTable )
- Parameters:
-
- Returns:
- nil