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
069a4fb170
Renderer: Don't sort z=0 Commands
...
If Command has z==0, then those elements won't be sorted.
Only Z !=0 will be sorted, and it will use `sort` instead of `stable_sort`
for z!=0, since it is faster
2014-01-17 23:10:04 -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
feec6a1e8a
Adds some Asserts in the renderer
...
Linux still has a bug, but I can't reproduce it all the time.
Hoping that these asserts will help me find it
2014-01-16 22:29:25 -08:00
Ricardo Quesada
cfbceb0e22
Fixes compilation issues on Linux
2014-01-16 21:49:14 -08:00
Ricardo Quesada
d0dbf34319
removes "include "cocos2d.h" from cocos2d files
2014-01-16 21:35:58 -08:00
Ricardo Quesada
cb9761125b
Renderer: When not using VAOs, call...
...
... glBufferData() to update the contents, and not glBufferSubData()
since the performance is better
2014-01-16 15:02:39 -08:00
Ricardo Quesada
3b20ad5ab7
More renderer optimizations
2014-01-15 19:10:40 -08:00
Ricardo Quesada
9388253606
SpriteBatchCommand and ParticleBatchCommand use the BatchCommand
...
BatchCommand is being used by SpriteBatchCommand and ParticlesBatchCommand
This improves performance in batches
2014-01-15 16:07:38 -08:00
Ricardo Quesada
65602a4574
Updates Xcode, Android and Linux project
...
with new BatchCommand
2014-01-15 16:06:47 -08:00
Ricardo Quesada
f8dc8f0b38
Renderer performance fixes
...
QuadCommand no longer stores a copy of the quads.
Instead it just stores a reference and the MV matrix.
Later, the Renderer when it copies the Quads to the queue, it will
convert the Quads to world coordinates
2014-01-15 14:35:26 -08:00
Nite Luo
a18788ff0a
Fix artifects when VBO is full
2014-01-14 16:45:40 -08:00
Dhilan007
a1d8e8bdb1
fix compiling error cause by macro define on window platform.
2014-01-14 12:28:24 +08:00
Ricardo Quesada
9386866d56
cocos2d::log() moved to CCConsole
...
Unified console code since it is 90% similar to all platforms
2014-01-10 19:04:07 -08:00
Ricardo Quesada
1dc169b19f
Camera is working again
...
Projection is passed in the shader.
Since P is in the shader, QuadCommand uses `Vec3Transform` instead of `Vec3TransformCoord` since it is faster.
2014-01-09 14:26:22 -08:00
Ricardo Quesada
aa2168f66f
RenderQuad with bigger size
...
It uses 18 bits for texture id
and 10 bits for shader id
This is a temporal fix
2014-01-06 23:41:01 -08:00
walzer
64af0de648
update copyrights for 2014, in cocos/2d/ folder
2014-01-07 11:25:07 +08:00
James Chen
8145bf903e
texture listener was enabled only when the macro CC_ENABLE_CACHE_TEXTURE_DATA was enabled.
2013-12-31 11:02:01 +08:00
James Chen
cf006df9ff
closed #2865 : Deprecates CCNotificationCenter, uses EventDispatcher instead.
2013-12-31 10:54:37 +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
b17117a1a1
More warning fixes.
2013-12-28 14:34:52 +08:00
minggo
ec3b3ea012
Merge pull request #4696 from dumganhar/warning-fix
...
Some warning fixes on linux.
2013-12-27 01:56:47 -08:00
James Chen
febc19ea8d
Some warning fixes on linux.
2013-12-26 23:06:16 -08:00
Huabing.Xu
66e550e5a0
Merge branch 'develop' into develop_removeCommandPool
...
* develop: (33 commits)
fix black screen when back to foreground on android.
Fix set FPS broken.
Update CHANGELOG [ci skip]
Update AUTHORS [ci skip]
Update CCString.cpp
[AUTO] : updating submodule reference to latest autogenerated bindings
Updates Bindings-generator.
Renames: IntValueMap —> ValueMapIntKey
Restricts the element type for Vector<T> and Map<K, V>, it has to be `Object*` or `ObjectSubClass*`.
Modify reader
long --> ssize_t for TableView callback.
Generates execute file in cocos root_dir/bin folder for HelloCpp.
Add listview and pageview reader
[AUTO] : updating submodule reference to latest autogenerated bindings
Modify actionnode
[AUTO] : updating submodule reference to latest autogenerated bindings
optimize loop
fix LabelTestNew
Compilation fixes after merge PR #4669 https://github.com/cocos2d/cocos2d-x/pull/4669
Fix box2dView
...
2013-12-27 14:07:04 +08:00
Huabing.Xu
76d07fc76e
remove empty interface releaseToCommandPool
2013-12-27 14:02:17 +08:00
Huabing.Xu
40af66a7bc
remove commandPool in renderCommand
2013-12-27 13:51:11 +08:00
Dhilan007
f250d24766
fix black screen when back to foreground on android.
2013-12-27 11:56:56 +08:00
boyu0
a19d212f4f
fix bug.
2013-12-26 22:00:52 +08:00
boyu0
6bc0a7066f
change CustomCommand variable to class member.
2013-12-26 21:19:12 +08:00
boyu0
dec003477c
delete ‘delete ptr’ and add CC_UNUSED_PARAM
2013-12-26 19:25:53 +08:00
boyu0
2fb0179293
change QuadCommand variable to class member.
2013-12-26 16:36:03 +08:00
boyu0
f878864794
Specialize GroupCommand and CustomCommand, change generateCommand to new.
2013-12-26 15:41:47 +08:00
Huabing.Xu
b4c61d5a7c
specialize RenderCommandPool<QuadCommand>
2013-12-26 14:44:21 +08:00
Huabing.Xu
9db599c0c9
remove class NewClippingNode
2013-12-24 14:10:54 +08:00
Huabing.Xu
24ac743a3c
remove class NewSpriteBatchNode
2013-12-24 11:03:59 +08:00
Huabing.Xu
410cfb9ca4
move NewSpriteBatchNode feature function into SpriteBatchNode
2013-12-24 10:48:57 +08:00
Huabing.Xu
8d58e43ad2
remove Class NewSprite
2013-12-24 09:40:00 +08:00
Huabing.Xu
1dd2c1c20c
remove NewTextureAtlas
2013-12-23 20:11:50 +08:00
Huabing.Xu
bcaec978d3
remove NewRenderTexture Class
2013-12-23 18:04:04 +08:00
Huabing.Xu
a7a50dffcc
move begin(), end(),draw() to RenderTexture
2013-12-23 17:13:06 +08:00
Huabing.Xu
fad585fbef
move rendering callback to RenderTexture
2013-12-23 15:59:47 +08:00
Huabing.Xu
b7c0d7a9e8
1. remove redundant code in NewRenderTexture 2. rename protected beginWithClear to _beginWithClear
2013-12-23 14:59:44 +08:00
James Chen
e56a4a7c00
Merge pull request #4567 from dumganhar/for_each-gone
...
All std::for_each has gone. uses for(const auto& ...) instead.
2013-12-19 18:50:50 -08:00
James Chen
34382b4a8a
More std::for_each —> for(const auto& …)
2013-12-20 09:54:50 +08:00
Huabing.Xu
d51ad36613
Merge branch 'develop' into develop_gridNode
...
* develop: (67 commits)
Adds const in ShaderTest2.h
Skew works again!
[AUTO] : updating submodule reference to latest autogenerated bindings
[AUTO] : updating submodule reference to latest autogenerated bindings
Reverts submodule.
Updates submodule of bindings-generator.
Adds `std::for_each` test in invocation
Reverts bindings-generator.
fixed not render
iterator in Sprite fixes
update vs project for removes unneeded files
getNodeToParentTransform fixes
Node cleanup
[AUTO] : updating submodule reference to latest autogenerated bindings
Improves SpriteTest
[AUTO] : updating submodule reference to latest autogenerated bindings
Android and Linux fixes
removes `using namespace std` from header file
Removes unneeded files
change play arguments
...
Conflicts:
cocos/2d/CCNode.cpp
samples/Cpp/TestCpp/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp
2013-12-19 17:20:22 +08:00
Huabing.Xu
911e5b0bac
fix bug : group command nesting will cause infinite loop
2013-12-19 16:55:22 +08:00
boyu0
c6cc77e75b
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into edit_hungarian_notation
2013-12-19 09:45:21 +08:00
Ricardo Quesada
7616edd9f3
Improves SpriteTest
...
Improves SpriteTest.
It is easier to see if Sprite works as SpriteBatchNode (and vice-versa).
Needed for the new renderer.
Also adds `const` to title() and subtitle()
2013-12-18 13:52:10 -08:00
Ricardo Quesada
903844c7bd
Removes unneeded files
...
New functionality is merged into the 'official' classes
2013-12-18 11:44:45 -08:00
boyu0
082c3d274a
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into edit_hungarian_notation
2013-12-18 18:05:30 +08:00