Commit Graph

146 Commits

Author SHA1 Message Date
minggo 2beed5d398 Merge pull request #6166 from dabingnn/develop_fix_rendererBug
Develop fix renderer bug
2014-04-10 00:27:33 +08:00
minggo ccbd77309d change QuadCommand::generateMaterialID() to private 2014-04-08 17:49:18 +08:00
Huabing.Xu 7f1fb13113 closed #4629: remove unused _renderStack 2014-04-08 16:54:00 +08:00
Huabing.Xu 1a7f46598f closed #4629: fix bug for group command 2014-04-07 22:51:32 +08:00
James Chen 7b4a1308ea Adds `Renderer::clean`, and fixes crash in `PerformanceTest/Node
children Test`.
2014-04-04 12:48:16 +08:00
Ricardo Quesada b36ab33281 performance fixes in QuadCommand 2014-04-01 16:13:41 -07:00
minggo 504eea0269 use xxhash to generate material id 2014-03-31 13:47:07 +08:00
Huabing.Xu bc15ac1415 closed #4552: change assert log message 2014-03-26 10:07:50 +08:00
Huabing.Xu 9aa8327d9c closed #4552: separate material ID and openGL ProgramID 2014-03-25 16:54:29 +08:00
Ricardo Quesada 57b6478de7 Improved documentation 2014-03-06 16:14:06 -08:00
Ricardo Quesada 273d0d22f1 little performance improvement in quad command 2014-03-05 18:50:09 -08:00
Ricardo Quesada 4fe3b16287 Updates to latest version of kazmath 2014-03-04 16:33:00 -08:00
Huabing.Xu cd7b075900 closed #3874: fix bug, blendID should be shifted by 50 bits 2014-02-27 09:27:33 +08:00
Huabing.Xu c7315a2e3e closed #3874: expand textureID bit to 32bits 2014-02-26 15:01:45 +08:00
James Chen 5e6130c92c issue #4058: Get rid of Object ,rename it to Ref. 2014-02-20 10:53:49 +08:00
Ricardo Quesada 82700339c0 Adds a way to print the renderer vertices 2014-02-07 19:37:44 -08:00
Huabing.Xu 159f44a5dc issue #3812: performance improvement, 1. add vector reserve 2. use C++11 range loop 2014-01-22 18:24:23 +08:00
Huabing.Xu cc39ca4f16 issue #3812: rename convertToWorldCoordiantes->convertToWorldCoordinates 2014-01-22 17:09:13 +08:00
Huabing.Xu 7ea9a4f025 issue #3812: remove member variable _lastCommand 2014-01-22 16:03:04 +08:00
Huabing.Xu 5bbd48a9bf issue #3812: remove member variable _firstCommand, remove comment codes 2014-01-22 15:52:00 +08:00
Huabing.Xu 5397618aab Merge branch 'develop' into develop_refactor_culling
* develop: (127 commits)
  issue #3677: Wrong include fix.
  issue #3677: File rename. PerformanceEventDispatcher.h/.cpp -> PerformanceEventDispatcherTest.h/.cpp.
  issue #3677: Updates Windows project to add PerformanceEventDispatcherTest.
  issue #3677: Updates Android.mk and CMakeLists.txt.
  issue #3677: Adds EventDispatcher performance test.
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Update CHANGELOG [ci skip]
  Update CHANGELOG [ci skip]
  [AUTO] : updating submodule reference to latest autogenerated bindings
  issue #3713: every autorelease will cause a release operation
  do not mix github access token with jenkins job trigger token
  issue #3781, Update travis-scripts, llvm-installing parts no need now.
  issue #3713: use reference in loop
  issue #3781, Minor fix & update submodule.
  closed #3808: EditBox on Mac works again.
  issue #3713:fix memory leak of autoreleas pool
  closed #3808: Removes unused files for MAC platform after using glfw3 to create opengl context
  global Z order uses floats
  ActionsProgress test include fixes
  Removed unused code and files.
  ...

Conflicts:
	cocos/2d/renderer/CCRenderer.cpp
2014-01-22 15:37:25 +08:00
Huabing.Xu cf6785ffcf issue #3812: using std::vector<QuadCommand*> to hold current batched command 2014-01-22 15:18:27 +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
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