Commit Graph

22 Commits

Author SHA1 Message Date
Huabing.Xu b9af100493 visit() using Matrix instead of kmMat4 2014-04-08 21:45:54 +08:00
Huabing.Xu c593938ed2 migrate nodeGrid 2014-04-02 22:50:39 +08:00
Ricardo Quesada d78304599d Cache working OK.
Performance increased in 20% for static objects.
2014-02-28 16:10:48 -08:00
Ricardo Quesada 6920bec6ef transform object returns the MV
code cleaner.
the kmGL code is altogether
2014-02-28 11:20:53 -08:00
Ricardo Quesada eb66ddd931 visit and draw improved.
`visit()` and `draw()` are improved.
they both receive:
 - `Renderer`
 - `kmMat4` for transformation
 - `bool` whether or not the transform changed from the previous frame

Although `draw` and `visit` are not using the 3 new parameters,
they will start using it in the coming days (or weeks, or months).

Those parameters are needed for:
 - `Renderer` shouldn't be a singleton. There should be one renderer per Director. There could be more than one renderer
 - we should get rid of `kmGLXXX` functions since nodoby knows what is happening. the `kmMat4` is for that.
 - whenever possible, we should try to optimize the multiplications. the `dirty` flag is for that.

We need those changes, so, it is better to change the API now, and not right after v3.0-final is released.
2014-02-27 21:43:54 -08:00
James Chen 9f793f8a9b Warning fixes: 1) getZOrder —> getLocalZOrder. 2) long —> int 2014-01-20 15:03:30 +08:00
Ricardo Quesada 5fcbf42356 GlobalZOrder is used for render priority...
...and not vertexZ

Node::setGlobalZOrder() is used to change that.

Node::setZOrder() -> Node::setLocalZOrder();
2014-01-18 11:38:06 -08:00
Ricardo Quesada 8931d968c0 Renderer uses a float as a key
Instead of using a 64-bit int key with viewport, opaque and depth,
it only uses a 32-bit float with only the depth.
Saves time in:
 - No need to convert the 32-bit float into 24-bit int
 - keys are shorter
2014-01-17 16:08:29 -08:00
Ricardo Quesada d0dbf34319 removes "include "cocos2d.h" from cocos2d files 2014-01-16 21:35:58 -08:00
walzer 64af0de648 update copyrights for 2014, in cocos/2d/ folder 2014-01-07 11:25:07 +08:00
minggo 0e9b43248c Merge pull request #4728 from dabingnn/develop_removeCommandPool
Develop remove command pool
2013-12-29 21:53:12 -08:00
James Chen febc19ea8d Some warning fixes on linux. 2013-12-26 23:06:16 -08:00
boyu0 6bc0a7066f change CustomCommand variable to class member. 2013-12-26 21:19:12 +08:00
boyu0 d32fbbbfca change GroupCommand variable to class member. 2013-12-26 18:11:23 +08:00
boyu0 f878864794 Specialize GroupCommand and CustomCommand, change generateCommand to new. 2013-12-26 15:41:47 +08:00
Ricardo Quesada d8ad5291f4 Nore camera 2013-12-20 16:33:31 -08:00
Ricardo Quesada 0703d974e2 NodeGrid fixes
Adds license
Removes unneded matrix
replaces std::for_each with for range-loop
2013-12-20 11:52:52 -08:00
Huabing.Xu 034e1152e5 minor change accord to cocos2d coding style 2013-12-19 21:41:07 +08:00
Huabing.Xu 44366c653c fix compile error 2013-12-19 17:20:36 +08:00
Huabing.Xu 1bc7250f7e node grid migrating to new renderer 2013-12-19 16:54:39 +08:00
Huabing.Xu 46d1d5bb91 add GridNode New renderer imp 2013-12-18 17:19:50 +08:00
Huabing.Xu 6aa2908c13 rename:
1. class: GridNode->NodeGrid
2. function: setNodeGrid->setGrid  getNodeGrid->getGrid setGridTarget->setTarget
3. file: CCGridNode.h&cpp->CCNodeGrid.h&cpp
2013-12-16 14:21:05 +08:00