minggo
575ed756d1
should check validation of _stencil ( #16913 )
2016-11-29 10:46:20 +08:00
minggo
88f6825c48
reset stencil program when alpha threshold is set to 1 ( #16858 )
2016-11-18 09:28:01 +08:00
Wilson E. Alvarez
c0e1e91373
Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. ( #16716 )
...
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.
Other minor trivial changes were applied.
* Fixed Android compilation error
* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
James Chen
b135d512d2
Update copyright to 2016. ( #16311 )
2016-08-05 09:42:15 +08:00
Aaron
dd6fed7928
Fixed ClippingNode not cleaning up _stencil correctly ( #15814 )
...
* Fixed ClippingNode not cleaning up _stencil correctly
_stencil may be running due to onEnter() called by ClippingNode. If onExit() is not called then Node::~Node() will assert when _stencil is released.
* Added onEnterXXX to ClippingNode::setStencil()
ClippingNode::_stencil would not be initialised correctly when set after ClippingNode was adding to the active scene.
2016-06-15 14:55:29 +08:00
minggo
fba4bead70
fix memory leak
2016-05-03 11:24:22 +08:00
pandamicro
6a6407f711
Pass native references to script scope
2015-12-21 00:16:16 +08:00
zilongshanren
3e64e09e69
fix memory leaks of stencileStateManager
2015-12-14 10:40:09 +08:00
zilongshanren
584a5d7407
fix alphaThreshold undefined issue
2015-11-25 18:27:38 +08:00
zilongshanren
03046d6fbd
change the default alphaThreshold
2015-11-25 14:31:32 +08:00
zilongshanren
759c0bbf31
rename CCStencilBitsManager to StencilStateManager
2015-11-25 14:24:27 +08:00
zilongshanren
5fef088695
refactor stencil state management code
2015-11-25 14:14:17 +08:00
zilongshanren
9c2130e88a
fix Layout and ClippingNode nested rendering issue
2015-11-24 18:01:50 +08:00
Martin Taylor
62e36e8006
fix typos and syntax error. A thorough check by tool VSSpellChecker.
2015-09-22 16:08:23 +08:00
pandamicro
9fea134de1
Use sendNodeEventToJSExtended instead of sendNodeEventToJS in sub classes
2015-07-28 18:24:03 +08:00
pandamicro
89c722ed4b
Add script invocation for onEnter, onExit etc in other classes
2015-07-28 16:07:14 +08:00
xpol
29dcbe6685
Fixes some warnings and a related bug in CCSprite.
...
This story tells us that we should not just ignore warnings.
2015-07-07 23:01:24 +08:00
yangxiao
269feeb1f9
remove stencil from Renderstate
2015-07-01 14:06:37 +08:00
Ricardo Quesada
c17da7e90d
Removes not-needed draws
2015-06-15 10:40:47 -07:00
Ricardo Quesada
32aae46343
fixes
2015-06-12 15:37:29 -07:00
Ricardo Quesada
2a3347dd49
RenderState: default state fixes
...
parts of cocos2d code calls GL directly.
This should be avoided since v3.7 since the
`RenderState::StateBlock::_defaultState` won't know that
and the state will be invalid.
In order to fix this issue, after calling GL directly, you should
update the `_defaultState` manually.
2015-06-12 15:03:48 -07:00
Vladimir Timofeev
fd3e44b72b
Fix warning in the ClippingNode class. Do not define the setProgram(Node*,GLProgram*) helper function on 'non OpenGL ES' platforms.
2015-05-01 12:36:19 +03:00
Vladimir Perminov
4c33050536
Optimize Vec2
...
small function Vec2 move to Vec2.inl
Added:
setZero();
Change all code:
_vec2 = Vec2(x, y); -> _vec2.set(x, y);
Vec2 vec2 = Vec2(x, y); -> Vec2 vec2(x, y);
_vec2 += Vec2(x, y); -> _vec2.add(x, y);
_vec2 = Vec2::ZERO; -> _vec2.setZero();
Vec2 vec2(Vec2::ZERO); -> Vec2 vec2;
2015-04-19 20:40:52 +03:00
yangxiao
5b26ba3c68
override setCameraMask
2015-03-16 17:11:17 +08:00
huangshiwu
cd00de572d
add glBindBuffer for drawnode and clippingnode to avoid crash
2015-01-29 18:06:20 +08:00
teivaz
2d75ceafb7
- set const modifier to ClippingNode::hasContent()
2014-11-13 12:43:05 +02:00
teivaz
7c355a087b
- Optimization in CCClippingNode.
...
Disable visiting when no objects has to be drawn under stencil.
2014-11-11 21:09:58 +02:00
cpascal
a70f51b1e3
Fixed invalid use of CC_TARGET_PLATFORM in the CCClippingNode
...
I modified CC_PLATFORM_WINDOWS to CC_PLATFORM_WIN32.
--
In the CCPlatformConfig.h,
the definitions are..
// win32
#if defined(WIN32) && defined(_WINDOWS)
#undef
CC_TARGET_PLATFORM
#define CC_TARGET_PLATFORM
CC_PLATFORM_WIN32
#endif
2014-09-23 17:35:57 +09:00
huangshiwu
c8bdba69ad
fix bug produce by CCDrawNode in test Node:UI-GUI Editor test-ScrollView PageView ListView
2014-09-17 14:00:40 +08:00
huangshiwu
3907e5c1a2
fix ClippingNode's memory leak bug
2014-09-16 14:50:00 +08:00
huangshiwu
8922121ed1
Deprecate DrawPrimitives and enhance DrawNode --make some modify
2014-09-12 07:33:34 +08:00
huangshiwu
8d8f4436db
Deprecate DrawPrimitives and enhance DrawNode --fix android compile error
2014-09-11 17:55:47 +08:00
huangshiwu
d9634057ab
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_drawnode_prbk
2014-09-11 16:41:54 +08:00
huangshiwu
fb1d47900c
Deprecate DrawPrimitives and enhance DrawNode
2014-09-11 15:39:56 +08:00
Ricardo Quesada
2c068cd1f5
Merge pull request #7915 from ricardoquesada/xcode_mark_todo_fixme
...
Adds MARK: TODO: FIXME: in code
2014-08-29 12:55:14 -07:00
Ricardo Quesada
c149bfca00
Adds MARK: TODO: FIXME: in code
...
Replaces XXX with FIXME:
Xcode 6 beta 4 supports this new format
2014-08-29 12:54:24 -07:00
minggo
7baf873bf6
remove unneeded includes
2014-08-28 17:03:29 +08:00
Ricardo Quesada
3dda35b4ef
Adds `std::nothrow` to `new`
...
Since cocos2d-x doesn't support exceptions, it is important to add
`std::nothrow` to all the `new` statements
2014-08-27 16:31:57 -07:00
yangxiao
032ba062a9
rename isVisibleByVisitingCamera to isVisitableByVisitingCamera
2014-08-14 10:26:37 +08:00
yangxiao
4629d257e1
rename checkCameraMask to isVisibleByVisitingCamera
2014-08-14 09:58:11 +08:00
yangxiao
76329f9e53
add camera mask check to visit
2014-08-13 12:06:51 +08:00
pandamicro
94fdff1da9
Fixed #5563 : Make sendNodeEventToXXX as static functions of ScriptEngineManager in CCScriptSupport
2014-06-18 11:51:52 +08:00
pandamicro
d00c9fe70a
Fixed #5563 : Add sendNodeEventToJSExtended function to fix issues and remove lua event send (unnecessary)
2014-06-16 12:50:35 +08:00
pandamicro
d524ba1013
Fixed #5563 : Wrap override onEnter function by script call detection code to solve bugs in JSB
2014-06-13 17:59:23 +08:00
Ricardo Quesada
1b8d0d88df
Adds setNormalizedPosition()
...
Changes in `visit()` were done in order to do it
in a robust and fast way.
2014-05-30 16:42:05 -07:00
Ricardo Quesada
dc711643cd
Squashed commit of the following:
...
commit a9572b8913f3a38b59adbd7b4017ab9848a6b2b5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed May 14 10:03:44 2014 -0700
math renames
`Vector2` -> `Vec2`
`Vector3` -> `Vec3`
`Vector4` -> `Vec4`
`Matrix` -> `Mat4`
commit 4e107f4bd854c26bfceb52b063d6bd9cea02d6a3
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 09:24:28 2014 -0700
raw version of rename Vector3
commit 1d115573ebe96a5fc815fa44fbe6417ea7dba841
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 09:07:14 2014 -0700
rename Vector2 after merge
commit ab2ed58c129dbc30a4c0970ed94568c5d271657b
Merge: 1978d2d 86fb75a
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 09:05:30 2014 -0700
Merge branch 'v3' into v3_renameMathClassName
Conflicts:
tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest_Editor.cpp
tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UICheckBoxTest/UICheckBoxTest_Editor.cpp
tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISliderTest/UISliderTest_Editor.cpp
tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp
tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest_Editor.cpp
commit 1978d2d174877172ccddc083020a1bbf43ad3b39
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 08:51:45 2014 -0700
rename vector2 in tests/cpp-empty-test folder
commit d4e0ff13dcce62724d2fece656543f26aa28e467
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:58:23 2014 -0700
rename vector2 in tests/cpp-tests cpp files
commit be50ca2ec75e0fd32a6fcdaa15fe1ebb4cafe79f
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:52:57 2014 -0700
rename vector2 in tests/cpp-tests head files
commit 6daef564400d4e28c4ce20859a68e0f583fed125
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:49:48 2014 -0700
rename vector2 in extension folder
commit 8f3f0f65ceea92c9e7a0d87ab54e62220c5572e2
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:47:22 2014 -0700
rename vector2 in cocos/2d cpp files
commit e1f3105aae06d595661a3030f519f7cc13aefbed
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:44:39 2014 -0700
rename vector2 in cocos/2d head files
commit 6708d890bfe486109120c3cd4b9fe5c078b7108f
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:40:59 2014 -0700
rename vector2 in cocos/base folder
commit d3978fa5447c31ea2f3ece5469b7e746dfba4248
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:40:43 2014 -0700
rename vector2 in cocos/deprecated folder
commit 4bff45139363d6b9706edbbcf9f322d48b4fd019
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:40:26 2014 -0700
rename vector2 in cocos/editor-support folder
commit 353d244c995f8b5d14f635c52aed8bc5e5fc1a6f
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:36:48 2014 -0700
rename vector2 in cocos/ui folder
commit 758b8f4d513084b9922d7242e9b8f2c7f316de6c
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:32:39 2014 -0700
rename vector2 in cocos/renderer folder
commit 0bd2710dd8714cecb993880bc37affd9ecb05c27
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:32:15 2014 -0700
rename vector2 in cocos/physics folder
commit b7f0581c4587348bdbc1478d5374c2325735f21d
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:25:01 2014 -0700
rename vector2 in cocos/math folder
commit a8631a8e1a4e2740807ccd9be9d70de6ecaad7dd
Author: Huabing.Xu <dabingnn@gmail.com>
Date: Wed May 14 00:16:55 2014 -0700
rename Vector2 to Vec2
deprecate typedef Vector2
2014-05-14 10:07:09 -07:00
Ricardo Quesada
a8c2fb5431
Fixes deprecated warnings
2014-05-09 21:29:24 -07:00
Ricardo Quesada
77c03fcf11
ShaderCache -> GLProgramCache
2014-05-09 18:39:25 -07:00
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