Created
June 2, 2014 05:34
-
-
Save mootoh/f5db6f11c4167476a758 to your computer and use it in GitHub Desktop.
cocos2d drawScene
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Director::drawScene | |
Scene(Node)::visit | |
matrix transform | |
push & set model_view matrix to it | |
sort all children | |
for child in children whose zOrder < 0: | |
child.visit | |
Node::draw | |
for child in children whose zOrder >= 0: | |
child.visit | |
pop model_view matrix | |
Renderer::render | |
renderqueue.sort | |
visitRenderQueue | |
for each cmd in queue | |
exec cmd by its type | |
flush | |
drawBatchedQuads | |
draw polygons to GL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment