Commit Graph

114 Commits

Author SHA1 Message Date
Ricardo Quesada 62d9c24518 moves shaders files from 2d/ to renderer/ 2014-05-08 18:01:48 -07:00
Ricardo Quesada 51f498fc94 fixed deprecation warnings 2014-05-08 16:42:36 -07:00
Ricardo Quesada 580ebf939f working Ok with new API 2014-05-08 15:43:12 -07:00
Ricardo Quesada 40fe815ab9 Squashed commit of the following:
commit c16dcfaaea0922039aad05bce1f4efed18e04871
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 19:05:18 2014 -0700

    more linux fixes

commit 1553795976c9090a1b46deb53d12910fe0676008
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 19:04:04 2014 -0700

    more linux fixes

commit 1e43a8cabff33cbf25aa5eb5412f53a878222d83
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 19:02:07 2014 -0700

    fixes linux isuses

commit 723a445dd6411f91846da2b801248ad8298174f1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:58:50 2014 -0700

    more linux fixes

commit 533c8025e794fc76cef02f396b3a93b3d7f4cfc8
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:57:33 2014 -0700

    more linux fixes

commit 4ba1e84959670bcbf044f18d1c0d4b3cb3be4090
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:53:43 2014 -0700

    more linux fixes

commit 1f8e011f306a47ed4134224e5e349929201f0539
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:49:28 2014 -0700

    more linux fixes

commit 3e2033100822ff6d532a1b4f012337491dc11920
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:47:43 2014 -0700

    more linux fixes

commit 2e708863c75fd032f1b2396dfdf1d31f7a62b713
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:46:00 2014 -0700

    more linux fixes

commit 861b5b92a6efd4de7b926c20d636ce9d749b293f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:43:15 2014 -0700

    more linux fixes

commit 2a43365a0c1755e9b9cada53301be1a20adb31cf
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:36:06 2014 -0700

    more fixes for linux

commit 7d332bf911892f87c7824d2a5da7bf73ce7ec411
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:35:29 2014 -0700

    more fixes for linux

commit f1becc17d3316dfe3678c23c9dcedb7a447d9235
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:34:44 2014 -0700

    more fixes for linux

commit d2e5959bb0dde921dd5e73be1d8acc3b3f50e51d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:33:45 2014 -0700

    fixes for linux

commit ad9b633c352107cf0e8b060a0e23d6e6a3f5e80f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:16:48 2014 -0700

    compiles on Windows

commit 4425ee8e5de8f42a2d6050e4470109600dce8b5d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 30 18:07:20 2014 -0700

    fix builder
2014-04-30 19:09:13 -07:00
Ricardo Quesada 8bb8416c26 Improved directory structure 2014-04-29 17:37:36 -07:00
Ricardo Quesada 81c2d92355 yeah... love in includes
<3
2014-04-26 10:35:57 -07:00
Ricardo Quesada 9b118e5e96 Squashed commit of the following:
commit 519fcd7f68e3586c376fd5e8d4a0ee220a48d225
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 10:10:06 2014 -0700

    Updates templates files

commit 2b07843ebe592f56b2abc544ccf66d441bb19fc5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 10:08:19 2014 -0700

    compiles on Windows

commit b175522ef7205eaab3bd3f26c27c5d6514cbe2a4
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:55:30 2014 -0700

    adds cocos2d.h

commit 4c3d14f929bac017b93ca843b4f149d352264a30
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:54:24 2014 -0700

    re-adds missing files

commit f729181728959260d14c4152555534f5beec8e05
Merge: 148da79 2adac67
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:51:12 2014 -0700

    Merge branch 'includes_fixes' of github.com:ricardoquesada/cocos2d-x into includes_fixes

commit 148da79010c5dffeab885933624cffaf3d588852
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:49:12 2014 -0700

    Adds SimpleAudioEngine

commit 2adac67019180ec82b7bd03f0b67c12f62e29e77
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:47:45 2014 -0700

    Compiles for Android

commit 4a300d1b9225fa5708f25a69a50bb531f0ac1a32
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat Apr 26 09:13:35 2014 -0700

    Fixes the includes
2014-04-26 10:11:22 -07:00
Huabing.Xu d14d3007d0 remove kazmath include file 2014-04-16 14:08:58 +08:00
Huabing.Xu 1670e07300 Merge branch 'develop' into develop_migrate_math_lib_merge
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_tests.xcodeproj/project.pbxproj
2014-04-11 11:18:13 +08:00
Huabing.Xu 231cdcb906 adjust comment message 2014-04-10 11:14:46 +08:00
James Chen 9d8d256bee issue #4729: Android build works ok. 2014-04-10 00:36:42 +08:00
Huabing.Xu 3837c23ebe draw() using Matrix instead of kmMat4 2014-04-08 22:07:35 +08:00
Huabing.Xu b9af100493 visit() using Matrix instead of kmMat4 2014-04-08 21:45:54 +08:00
Huabing.Xu 67971e9f0b migrate sprite spriteBatchNode to director matrix stack 2014-04-03 14:55:36 +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 5e6130c92c issue #4058: Get rid of Object ,rename it to Ref. 2014-02-20 10:53:49 +08:00
James Chen 19b1945efb closed #4054: Removing child from TMXLayer may cause crash. 2014-02-17 21:15:26 +08:00
Ricardo Quesada e402f35e7f BatchCommand API fixes
don't pass Texture Id.
Instead fetch it from the `TextureAtlas`
2014-01-21 11:13:21 -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
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
walzer 64af0de648 update copyrights for 2014, in cocos/2d/ folder 2014-01-07 11:25:07 +08:00
Huabing.Xu 381be48c56 init shader on construction instead of draw in class CCSpriteBatchNode 2014-01-06 11:26:00 +08:00
Dhilan007 49d8b76b9e fix crash related to not support the z length modifier for size_t on vs 2014-01-05 11:59:32 +08:00
Dhilan007 ebf3faadc3 fix crash related to not support the z length modifier for size_t on vs 2013-12-31 16:32:16 +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
boyu0 1a453a26ab Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into const_char_star_to_std_string
Conflicts:
	cocos/2d/renderer/CCNewSpriteBatchNode.cpp
	cocos/2d/renderer/CCNewSpriteBatchNode.h
2013-12-24 16:07:25 +08:00
boyu0 6e6ccbd5f9 change some const char* to const std::string& 2013-12-24 15:49:58 +08:00
Huabing.Xu b821a33cfa remove comment code 2013-12-24 11:28:42 +08:00
boyu0 3344c5243c change some const char* to const std::string& 2013-12-24 10:51:47 +08:00
Huabing.Xu 410cfb9ca4 move NewSpriteBatchNode feature function into SpriteBatchNode 2013-12-24 10:48:57 +08:00
minggo 756f8f7a11 Merge pull request #4482 from dabingnn/develop_gridNode
Develop grid node
2013-12-19 18:30:42 -08:00
Ricardo Quesada f5d0d1ce43 batched children work as expected
Fixed order in the multi matrix.
2013-12-19 16:33:47 -08:00
Ricardo Quesada 59fee6b8d2 replaces std::for_each with for()
replaces `std::for_each` with C++11 `for( : )`
2013-12-19 13:34:41 -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
boyu0 e07c4ffec1 Change NULL to nullptr, edit hungarian notation. 2013-12-18 17:47:20 +08:00
James Chen d16fa07661 Removes Vector<T>::forEach, please use std::for_each instead. The same as Vector<T>::sort. 2013-12-17 17:45:29 +08:00
Huabing.Xu b1eacd52cb Merge branch 'develop' into develop_gridNode
* develop:
  fix compile error related to ssize_t.
  issue #2771: add and change some physics API, and add more documents
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Some fixes for XXX:getDescription.
  Reverts CCSpriteBatchNode.h
  size_t —> ssize_t in CCTMXLayer.cpp
  issue #2771: add PhysicsWorld function set/getUpdateRate and set/getSpeed. Change name PhysicsQueryRectCallbackFunc and PhysicsPointQueryCallbackFunc to PhysicsRectQueryCallbackFunc and PhysicsQueryPointCallbackFunc
  Fix:Add lua binding of ’registerScriptHandler’、’unregisterScriptHandler’ and ’removeObjectAllHandlers’ of ScriptHandlerMgr and some constants define
  [AUTO] : updating submodule reference to latest autogenerated bindings
  More renames of description() to getDescription()
  getDescription() works as expected
  fix compiling error after fixing conflicts
  fix compiling error after fixing conflicts
  use ssize_t for index
  use ssize_t for index and capacity
  use ssize_t for capacity and index in containers
  Fix:Remove some needless lua binding functions and resolve a bug
2013-12-16 10:43:49 +08:00
James Chen bb5ef615dd Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into pr4479
Conflicts:
	cocos/2d/CCSpriteBatchNode.h
2013-12-13 16:44:22 +08:00
Ricardo Quesada a8c317bd83 getDescription() works as expected
renames `description` to `getDescription`. Adds `virtual`  to it.
Adds `getDescription` to missing nodes.
2013-12-12 14:30:22 -08:00
Huabing.Xu 5509bd48ef remove _grid 2013-12-12 16:21:21 +08:00
minggo 1e9c763b40 use ssize_t for index and capacity 2013-12-12 14:48:26 +08:00
minggo fa7c97171b fix some warnings 2013-12-06 16:32:06 +08:00
minggo b67d567a79 replace long with int or ssize_t 2013-12-05 17:22:22 +08:00
James Chen 499a0404d4 issue #2790: Renames some functions in Vector<T>. Makes it more like stl vector. 2013-12-05 10:35:10 +08:00
James Chen 9928e8bef1 issue #2790: Uses Vector<T>::getObjectAtIndex instead of Vector<T>[] operator to avoid some mistakes. 2013-12-04 16:01:55 +08:00
James Chen 8aef092005 issue #2790: TestCpp with new Vector<>. 2013-12-04 16:01:54 +08:00
James Chen 1d5984b29a issue #2790: Vector::makeObjectsPerformCallback —> Vector::forEach 2013-12-04 16:01:02 +08:00
James Chen d4d864216b issue #2790: Deletes Vector::init, adds Vector::setCapacity. 2013-12-04 16:00:18 +08:00
James Chen 90062b656d issue #2790: Node::_children is Vector<Node*> now. 2013-12-04 16:00:17 +08:00
minggo bbb2579114 Merge pull request #4160 from dabingnn/iss3025_TextureCache
[ci skip]Iss3025 texture cache
2013-11-10 23:08:01 -08:00
boyu0 6c1144ee79 issue #2770: fix some warning 2013-11-11 12:49:38 +08:00
Huabing.Xu 99bcca0532 issue #3025: replace TextureCache::getInstance() by Director::getInstance()->getTextureCache() in cocos folder 2013-11-07 19:11:09 +08:00
Ricardo Quesada ba7ed6e578 Fixes some compiler warnings
The warnings are related to:

* 64-to-32-bit conversion
* shadow variables
2013-11-04 16:31:36 -08:00
boyu0 e8d06496d0 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-10-30 17:27:09 +08:00
boyu0 66d1bbd89f issue #2771: edit physics effect with all bodies and fix some bugs 2013-10-28 16:17:19 +08:00
James Chen 1f3863e787 Event Dispatcher refactor commit. TestCpp could run. 2013-10-25 10:53:45 +08:00
minggo 95acb1b9e3 issue #2905: helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 49d7bbd600 issue #2905: remove sub folders except platform 2013-10-12 15:41:45 +08:00