Commit Graph

142 Commits

Author SHA1 Message Date
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
boyu0 e07c4ffec1 Change NULL to nullptr, edit hungarian notation. 2013-12-18 17:47:20 +08:00
James Chen 581ba49399 Diables CC_ENABLE_CACHE_TEXTURE_DATA in Renderer::initGLView since Renderer is not inherited from Object now. CCNotificationCenter will not be able to work.
Signed-off-by: James Chen <jianhua.chen@cocos2d-x.org>
2013-12-18 15:41:57 +08:00
Dhilan007 2d9b7ee4fc update vs project for new renderer and fix compiling fail on vs. 2013-12-18 14:36:49 +08:00
Ricardo Quesada 156f69c528 Renderer is subclass of Object again... needed for Android.
ouch
2013-12-17 19:06:22 -08:00
Ricardo Quesada 33c4f891a0 Adds 'CC' to renderer files 2013-12-17 18:41:09 -08:00
Ricardo Quesada f369a8eec3 Adds correct License to Renderer files 2013-12-17 18:12:15 -08:00
Ricardo Quesada 3f3071fbb6 Cleanup RenderCommand code
RenderCommand code is cleaner
2013-12-17 18:02:11 -08:00
Ricardo Quesada d6be81b7a8 The Renderer is not a singleton
In order to access, you have to get it from the Director

`Director::getInstance()->getRenderer()`
2013-12-17 17:50:17 -08:00
Ricardo Quesada 441cb6c282 fixes warnings in QuadCommand 2013-12-17 10:35:15 -08:00
James Chen 8f5970ef90 issue #2171: Don’t ‘using namespace std;’ in header file. 2013-12-17 15:32:24 +08:00
James Chen 4e01769cd5 issue #2171: [New Renderer] Fixing compilation errors for Android. 2013-12-17 14:18:41 +08:00
Ricardo Quesada 0222c6544e Migration to Mat4x4
Armature not migrated yet

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-12-09 17:32:51 -08:00
Ricardo Quesada 8df96b1a6e Layercolor uses the new API 2013-12-06 17:59:34 -08:00
Ricardo Quesada ba2f65c6b2 Merge remote-tracking branch 'darkdukey/newRenderer' into newRenderer 2013-12-06 17:42:48 -08:00
Ricardo Quesada ee0ef6bf46 ProgressTimer works OK
Adds _modelViewTransform as  ivar of Node (temporary fix)
2013-12-06 17:42:16 -08:00
Nite Luo 94255a9d52 Fix culling 2013-12-06 14:59:06 -08:00
Ricardo Quesada 439adafbcd Merge remote-tracking branch 'darkdukey/newRenderer' into newRenderer 2013-12-06 11:57:19 -08:00
Ricardo Quesada 745541979b Particles working again.
Paticle Batch working too: increased VBO_SIE to 10500
2013-12-06 11:51:17 -08:00
Nite Luo 3e0bee706e Fix a hack in CCLabelAtlas for vertice color, add TODO for quad command 2013-12-06 11:41:24 -08:00
Ricardo Quesada 97fb43b8d7 Merge remote-tracking branch 'darkdukey/newRenderer' into newRenderer
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
2013-12-06 11:19:12 -08:00
Ricardo Quesada 81b06f06a9 Merge branch 'develop' into newRenderer
Conflicts:
	cocos/2d/CCAtlasNode.h
2013-12-05 22:24:41 -08:00
Ricardo Quesada e699a3b765 Uses MV in Quad Command 2013-12-05 19:04:01 -08:00
Nite Luo 42de943662 Fix Bug for Sprite performance test 2013-12-05 14:25:45 -08:00
Nite Luo e3fc789070 Merge branch 'newRenderer' of github.com:darkdukey/cocos2d-x into newRenderer 2013-12-05 12:05:44 -08:00
darkdukey 5f902d95b3 Merge pull request #5 from dabingnn/newRendererParticleSystem
New renderer particle system
2013-12-05 12:05:18 -08:00
Ricardo Quesada f68dcd9969 Merge branch 'develop' into newRenderer
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	samples/Cpp/TestCpp/Classes/tests.h
2013-12-05 11:47:46 -08:00
Nite Luo 9b0e0d2116 Fix a bug with auto batching logic 2013-12-04 19:05:17 -08:00
Huabing.Xu e6823875d5 change VBO_SIZE to a big number to avoid crash temporarily 2013-12-05 10:20:54 +08:00
Nite Luo e316ac779b Sprite culling now using vertices directly to avoid calculation on transform 2013-12-04 17:41:18 -08:00
Nite Luo a98714f6a5 support device without VAO 2013-12-04 17:02:02 -08:00
Nite Luo 143df8af7d Fix RenderTexture after merging commandpool 2013-12-04 15:13:13 -08:00
darkdukey 4b7d0c290a Merge pull request #4 from dabingnn/newRendererCommandPool
New renderer command pool
2013-12-04 15:08:17 -08:00
Nite Luo f423166471 Fix bugs with RenderTexture with NewRender 2013-12-04 15:06:28 -08:00
Nite Luo ae551ae294 Convert RenderTexture to use RenderCommands 2013-12-04 11:54:57 -08:00
Huabing.Xu cd562676f5 use block allocation for commands 2013-12-04 10:39:34 +08:00
Huabing.Xu 757f1abc7f 1. protected render command construction/destruction function.
2. use renderCommandPool<T> to allocate and deallocate command
3. use releaseToCommandPool interface to push command back to pool
2013-12-03 14:08:47 +08:00
Huabing.Xu 44f12ce8e4 add RenderCommandPool head file 2013-12-03 11:52:51 +08:00
Huabing.Xu d4b9e0538b refactor: group command use a non parameter constructor and a reentrant init function 2013-12-03 11:24:03 +08:00
Huabing.Xu d33f05b3f0 refactor: custom command use a non parameter constructor and a reentrant init function 2013-12-03 11:17:21 +08:00
Huabing.Xu ace75eebce refactor: quad command use a non parameter constructor and a reentrant init function 2013-12-03 11:11:46 +08:00
Nite Luo 6862d59bb2 Add NewRenderTexture to convert RenderTexture to use new renderer 2013-12-02 17:23:52 -08:00
Nite Luo 8801f508eb Partcle system use the new renderer 2013-12-02 12:13:05 -08:00
Nite Luo fbadb3329a Merge branch 'develop' into newRenderer
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
2013-12-02 10:55:31 -08:00
Huabing.Xu 80da1dac3f add Frustum, AABB, ViewTransform 2013-11-27 10:34:30 +08:00
Nite Luo b67ec6618f Finish converting LayerColor start working on particle system 2013-11-22 17:14:24 -08:00
Nite Luo b02af0cbfe Clean up renderer code 2013-11-22 10:24:52 -08:00
Nite Luo 43941bcbe0 Only init render after GLview has been initialized 2013-11-21 16:36:19 -08:00
Nite Luo db52698b26 Fix the crash on ios 7 2013-11-20 20:39:32 -08:00
Nite Luo 0e51504ee6 Use stack to manage current RenderGroup 2013-11-20 11:05:01 -08:00
Nite Luo 7ad64ece36 Add Transform to DrawNode 2013-11-19 11:06:26 -08:00
Nite Luo abb011f0ef Test clipping node with alpha 2013-11-18 15:52:47 -08:00
Nite Luo c288e5ef9c Fix Clipping Node 2013-11-18 14:58:41 -08:00
Nite Luo f5a8c1d02c Fix NewClipNodeTest 2013-11-15 17:32:29 -08:00
Nite Luo 566767da60 Add NewDrawNode 2013-11-15 11:29:11 -08:00
Nite Luo 7ad93d8a94 Create new clippingNode 2013-11-14 16:39:03 -08:00
Nite Luo 8d63faa0de New Renderer working with RenderStack 2013-11-14 12:17:54 -08:00
Nite Luo 4f1858fa8a Crate NewClipping Node 2013-11-14 10:35:28 -08:00
Nite Luo f17af1f319 Add group command 2013-11-13 17:31:12 -08:00
Nite Luo 05bc444ccb Add some optimization tips 2013-11-13 10:26:26 -08:00
Nite Luo ab8b61aaec Create NewSpriteBatchNode to use NewRender 2013-11-12 11:18:49 -08:00
Nite Luo f6fb48ba56 Fix crashing bug 2013-11-11 11:54:08 -08:00
Nite Luo f68a2a47e7 Improved batching 2013-11-11 00:14:29 -08:00
Nite Luo 050f3f705e minor code format fix 2013-11-08 13:57:21 -08:00
Nite Luo fa9d8fe077 Add CustomCommand 2013-11-08 12:06:39 -08:00
Nite Luo 72828acaec Add some todo 2013-11-07 16:53:20 -08:00
Nite Luo 935d2bdebb Implement sprite batching 2013-11-07 16:50:53 -08:00
Nite Luo d7cb4ed219 First attempt for batching 2013-11-07 15:48:37 -08:00
Nite Luo 3421eb8e5d Cleanup the code a bit before implement sprite batching 2013-11-07 10:09:53 -08:00
Nite Luo 21cd03bc13 Remove transform from QuadCommand, NewSprite using world coordinates 2013-11-06 16:39:20 -08:00
Nite Luo 63324db70d Subclass QuadCommand 2013-11-06 14:57:42 -08:00
Nite Luo 3108d499e5 use placeholder logic to generate material id 2013-11-06 14:24:56 -08:00
Nite Luo 51fb1edc0c Fix sorting bug 2013-11-05 17:00:34 -08:00
Nite Luo e4ffd250cb Simple implementation of RenderCommand and RenderQueue 2013-11-04 09:14:22 -08:00