Commit Graph

70 Commits

Author SHA1 Message Date
James Chen 86411837c6 PLEASE NEVER `using namespace cocos2d;` in header file 2014-05-13 16:15:21 +08:00
Ricardo Quesada 012f1020ca GLProgramState fixes
It is possible to submit to the Renderer a Sprite with custom uniforms
(although it won't be batched).
It is possible to use a custom shader + uniforms on Sprite with
subclassing Sprite
2014-05-12 19:12:56 -07:00
Ricardo Quesada 77c03fcf11 ShaderCache -> GLProgramCache 2014-05-09 18:39:25 -07:00
Ricardo Quesada 51f498fc94 fixed deprecation warnings 2014-05-08 16:42:36 -07:00
Mircea Rila b66b4c6f1d upgrade win32 projects for Visual Studio 2013 (solves Platform Toolset v100 not found).
remove C4005 warnings after upgrading projects
2014-05-07 17:41:04 +03:00
Ricardo Quesada 32f3fedb37 Moves cocos/2d/Android.mk to cocos/Android.mk
Easier to find Android.mk
2014-05-01 14:09:26 -07:00
Ricardo Quesada 8bb8416c26 Improved directory structure 2014-04-29 17:37:36 -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
Ricardo Quesada b053a9145a Compiles on Windows32 2014-04-25 22:03:25 -07:00
Huabing.Xu 63b52dd287 replace Point with Vector2 in cocos folder cpp file 2014-04-15 18:13:57 +08:00
Huabing.Xu 5303f50904 Migrate to Vector2 in DrawPrimitive.h 2014-04-15 17:29:23 +08:00
Huabing.Xu a269ac2864 remove kmMat4 interface in cocostudio and UI 2014-04-09 14:44:54 +08:00
Huabing.Xu 3837c23ebe draw() using Matrix instead of kmMat4 2014-04-08 22:07:35 +08:00
Huabing.Xu 960ac300d5 migrate cocostudio to director matrix stack 2014-04-03 14:55:55 +08:00
Dale Stammen 31150ce189 added wp8 support files and projects 2014-03-28 12:55:40 -07:00
Ricardo Quesada a0ab8fcdf3 onDraw() updated
`onDraw()` receives `const kmMat4 &transform` and `bool
transformUpdated`.

`CC_NODE_DRAW_SETUP()` is no longer used in our code.
`_modelViewTransform` is only used as a cache.
2014-03-05 15:49:08 -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 ff79c0d9ad Merge branch 'develop' into visit_draw_improved 2014-02-28 10:59:07 -08:00
James Chen ec4a4466b4 Merge pull request #5461 from Wilhansen/spine_skelFix
closed #4156: spine::Skeleton would not be updated after re-adding to scene.
2014-02-28 16:34:35 +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
Ricardo Quesada 8ebf00fec1 SpineDrawing fixes 2014-02-27 19:40:21 -08:00
Wilhansen Li a1b7beb400 Fix spine::Skeleton not updating on re-entry.
Could be done in a tighter manner by scheduling updates in
spine::SkeletonAnimation instead and listening for animation events.
However, this may need a more robust interface on scheduleUpdate and
unscheduleUpdate to work correctly.
2014-02-25 15:36:57 +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 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
James Chen 1d852788e2 [Spine] Saves old transform matrix in Skeleton::draw, uses it in ::onDraw. 2014-01-07 21:40:06 +08:00
James Chen 9387e516be [JSB] Fix for SpineTest didn’t show anything. Skeleton uses new renderer. 2014-01-07 21:19:51 +08:00
James Chen 2a3481f20c Moves temp files to CURRENT_BINARY_DIR. 2014-01-06 23:44:36 -08:00
James Chen e509a52551 Small fix for `FREE` wrong variable. 2013-12-28 14:38:13 +08:00
James Chen b17117a1a1 More warning fixes. 2013-12-28 14:34:52 +08:00
James Chen 142b189305 Some warning fixes. 2013-12-25 16:06:39 +08:00
James Chen 538da31773 Removes CC prefix for CCSkeleton and CCSkeletonAnimation. Adds namespace `sp` for JSBindings. 2013-12-25 11:18:14 +08:00
James Chen 0ff85852cc Don’t use FileUtils::getInstance()->getFileData, please use getStringFromFile and getDataFromFile instead. 2013-12-24 18:08:40 +08:00
James Chen 6bbc6e2dde CCSkeleton is inherited from Node now. 2013-12-23 21:12:58 +08:00
James Chen ab7a273354 closed #3465: New spine runtime support, update CMakeLists.txt 2013-12-20 20:18:32 +08:00
James Chen cfec4d5b7e Updates spine test. 2013-12-19 21:35:43 +08:00
James Chen df85ba8fd9 Merge commit 'refs/pull/4545/head' of git://github.com/cocos2d/cocos2d-x into new-spine
Conflicts:
	cocos/editor-support/spine/CCSkeleton.h
2013-12-19 21:07:24 +08:00
boyu0 ef54ed3c15 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into HEAD
Conflicts:
	cocos/2d/CCLabel.cpp
	cocos/2d/CCLabel.h
	cocos/2d/CCLabelBMFont.cpp
	cocos/2d/CCLabelBMFont.h
	cocos/2d/CCLayer.cpp
	cocos/2d/CCLayer.h
	cocos/2d/CCNode.cpp
	extensions/GUI/CCControlExtension/CCControl.cpp
	extensions/GUI/CCControlExtension/CCControlButton.cpp
	extensions/GUI/CCControlExtension/CCScale9Sprite.cpp
	tools/tojs/cocos2dx.ini
2013-12-19 17:05:59 +08:00
byeonggee.seo e673bd80bb new spine runtime applied 2013-12-19 10:50:37 +09:00
Ricardo Quesada 10eafeaeed fixes warning compiler 2013-12-17 11:16:30 -08:00
boyu0 defae416f3 Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect 2013-12-13 18:09:39 +08:00
boyu0 d7106d49be Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect 2013-12-12 17:04:21 +08:00
minggo 1e9c763b40 use ssize_t for index and capacity 2013-12-12 14:48:26 +08:00
Dhilan007 35eeebe64a add comments for include "CCStdC.h" only for windows 2013-12-10 23:13:21 +08:00
Dhilan007 abef5b59fa fix compile error for vs project 2013-12-10 21:20:52 +08:00
boyu0 4d0e3dbd8d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into bug3162_opacity_incorrect 2013-12-06 18:16:26 +08:00
boyu0 af5f496861 issue #3162: Merge Node and NodeRGBA, fix bug: Child's opacity will not be changed when its parent's setCascadeOpacityEnabled was set to true and opacity was changed. 2013-12-06 18:07:16 +08:00
minggo fa7c97171b fix some warnings 2013-12-06 16:32:06 +08:00