Commit Graph

1152 Commits

Author SHA1 Message Date
James Chen bb86a9e350 Merge pull request #5517 from bmanGH/feature/fix_timer_cancel_bug
closed #4272: Timer::cancel always call Director::getInstance()->getScheduler() even in another Scheduler
2014-03-04 22:08:55 +08:00
minggo 6cb665b637 Merge pull request #5534 from dabingnn/develop_RenderTextureImprovement
Develop render texture improvement
2014-03-04 18:30:37 +08:00
Huabing.Xu 3d0cd62e12 add comment to make interface clearer 2014-03-04 17:34:48 +08:00
James Chen 98e1099370 Fixes crash of PerformanceTest/EventDispatcherTest. 2014-03-04 16:43:04 +08:00
Huabing.Xu 99d0ce160a rename setVirtualViewPort->setVirtualViewport 2014-03-04 15:41:36 +08:00
Huabing.Xu ec397611f6 remove blank line,adjust indent 2014-03-04 15:30:05 +08:00
Huabing.Xu 756024e9f1 implement interface setKeepMatrix, setVirtualViewPort 2014-03-04 15:07:28 +08:00
James Chen 387174d633 issue #4234: Acceleration -> const Acceleration& 2014-03-04 13:42:36 +08:00
James Chen 5c70548742 issue #4234: 'Event* event' needs to be in 'TouchScriptData' struct. 2014-03-04 13:42:06 +08:00
Huabing.Xu 68130fb4d0 fix matrix push/pop bug 2014-03-04 11:06:39 +08:00
Huabing.Xu a759d9ae60 calculate viewport based on _fullRect _rtRect and _fullRectViewport 2014-03-04 10:57:57 +08:00
Huabing.Xu 7949cb2cd9 add interface for keep Matrix 2014-03-04 10:41:03 +08:00
Ricardo Quesada 8bdfce9bbe Merge branch 'develop' into visit_draw_improved 2014-03-03 17:31:29 -08:00
Ricardo Quesada 81f5254e15 Removes setNormalizedPosition
This funciton is useful, but the code is buggy.
In should check the parents' position instead of Director::Size()
Let's do it correctly, and then re-add this function
2014-03-03 16:08:30 -08:00
Ricardo Quesada c386f88e32 Merge branch 'develop' into visit_draw_improved
Conflicts:
	CHANGELOG
	cocos/gui/UILayout.h
2014-03-03 11:27:42 -08:00
bmanGH d0f8dbd4be Fix Timer::cancel always call Director::getInstance()->getScheduler() even in another Scheduler; 2014-03-03 19:12:59 +08:00
minggo 594342ea3e Merge pull request #5505 from dumganhar/event-dispatcher-refactor
[EventDispatcher] Adds 'pauseEventListenersForTarget', 'resumeEventListenersForTarget' and 'removeEventListenersForTarget'.
2014-03-03 17:56:57 +08:00
minggo be0ac5dc1c Merge pull request #5493 from boyu0/bug4150_physics_position_rotation
closed #4150: fix physics position and rotation bug.
2014-03-03 14:57:33 +08:00
James Chen 1d2d2df1e9 issue #4165: Adds missing deprecated methods in Scheduler class. 2014-03-03 11:57:36 +08:00
James Chen 1aa9e35fb2 Merge pull request #5500 from dumganhar/scheduler-refactor
closed #4165: Refactors Scheduler class.
2014-03-03 11:20:06 +08:00
James Chen 04663b4a9c closed #4165: Updates comments. 2014-03-03 11:12:04 +08:00
James Chen 09c0bae4a1 closed #4165: Deprecates old methods: Scheduler::(un)scheduleSelector, Scheduler::isScheduleForTarget. 2014-03-03 11:07:48 +08:00
James Chen 757425c54b issue #4165: Scheduler::scheduleCallback -> Scheduler::schedule, Scheduler::scheduleSelector -> Scheduler::schedule. APIs are clear for c++ developers now. 2014-03-03 11:00:30 +08:00
boyu0 c99b0a0b6a closed #4150: Fix missing "!" 2014-03-03 01:48:56 +08:00
James Chen dceb047ba6 TimerTargetCallback::initWithLambda -> TimerTargetCallback::initWithCallback. 2014-03-02 18:43:17 +08:00
James Chen f3949e078b [EventDispatcher] Adds 'pauseEventListenersForTarget', 'resumeEventListenersForTarget' and 'removeEventListenersForTarget'. 2014-03-02 17:41:18 +08:00
James Chen 30d7130eb0 closed #4160: Out of range exception in EventDispatcher 2014-03-02 16:16:03 +08:00
Ricardo Quesada cdc19eea1c Nodes: setAdditionalTransform() receives a pointer
and not a const reference.
If the pointer is `NULL`, then it won't use the additionalTransform
2014-03-01 08:26:54 -08:00
Ricardo Quesada 219ef6d897 removes CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP support
It was never used. And it is slower.
2014-02-28 22:09:18 -08:00
James Chen e6d2c4ec73 Refactors Scheduler class.
* Timer is an abstract class now.
* Adds three new timers ( `TimerTargetSelector`, `TimerTargetCallback`, `TimerScriptHandler`) which are inherited from Timer.
* Adds new API 'scheduleCallback` / `unscheduleCallbackForKey', and callback's target could be any classes since we're using `void*` to identify target.
* `Scheduler::scheduleCallback` use `std::function`, therefore, it supports passing `lambda`, `member_function` and `global_function`.
* The old selector API is still kept since it's very useful when schedule callback is a member function, it doesn't need a `key` to identify the callback function. (+1 squashed commit)
* Adds relevant test cases.
2014-03-01 14:09:09 +08:00
Ricardo Quesada b50a787f6d Adds new ParticleTest for auto-batching 2014-02-28 22:03:36 -08:00
Ricardo Quesada 3588041409 removed empty spaces 2014-02-28 16:39:04 -08:00
Ricardo Quesada 9d501479c1 removes unused ivar from ParticleSystemQuad 2014-02-28 16:19:27 -08:00
Ricardo Quesada da8e571862 shaders set in the correct position 2014-02-28 16:14:55 -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 13b60c8759 Applies Wu Hao's patch for 2.5D 2014-02-28 13:48:00 -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 ff79c0d9ad Merge branch 'develop' into visit_draw_improved 2014-02-28 10:59:07 -08:00
James Chen 225b5e0e4f Merge pull request #5492 from dumganhar/iss4129-remove-all-listener
closed #4129: Event listeners used in engine shouldn't be removed by method removeAllEventListeners().
2014-02-28 16:09:54 +08:00
James Chen d33017f27a issue #4129: Adds default argument(nullptr) for dispatchCustomEvent. 2014-02-28 15:40:45 +08:00
boyu0 a934d29c57 issue #4150: Correct body position with the node has a parent. Add set/getPosition/Rotation method. 2014-02-28 15:31:25 +08:00
James Chen 7774bb4c6c closed #4129: Event listeners in engine shouldn't be removed by method removeAllEventListeners(). 2014-02-28 15:09:53 +08:00
James Chen bbc1c385c2 issue #4129: EventTouch::getTouches return const reference. 2014-02-28 15:08:18 +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 658cf72d31 issue #4129: Uses 'const reference' when getting touches by EventTouch::getTouches. 2014-02-28 13:43:28 +08:00
James Chen 8a04fbabf1 issue #4129: EventDispatcher::_listeners -> _listenerMap. 2014-02-28 12:01:47 +08:00
zhangbin ddf5957a9c closed #3684, Set shader program before TextureAtlas is rendered. 2014-02-28 11:43:41 +08:00
James Chen 4277509966 Merge pull request #5463 from andyque/refactor3877
closed #3877. make fadeIn and fadeOut behaviours correct
2014-02-27 21:49:38 +08:00
James Chen a96f44f31d Adds override for override functions (onEnter, onExit) in cpp-tests. 2014-02-27 21:10:03 +08:00
andyque 32d3bf03bd fixed #3877. make fadeIn and fadeOut behaviours correct 2014-02-27 21:00:25 +08:00