Skip to content

Commit 39e372e

Browse files
committed
use meshcommand
2 parents 734633e + 6d27912 commit 39e372e

File tree

583 files changed

+7387
-7536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

583 files changed

+7387
-7536
lines changed

AUTHORS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ Developers:
673673
xhcnb
674674
Device::setAccelerometerEnabled needs to be invoked before adding ACC listener.
675675
Fixed a bug that it will get wrong custom properties when use different count custom properties in CocosBuilder.
676+
Correct TotalTime of ActionObject
676677

677678
bopohaa
678679
Fixed a bug that Webp test crashes.
@@ -849,6 +850,9 @@ Developers:
849850

850851
myourys
851852
Make cpp template support Eclipse c++ project
853+
854+
NatWeiss
855+
Fix compilation error using arch i386
852856

853857
Retired Core Developers:
854858
WenSheng Yang

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
cocos2d-x-3.1-rc0 May.16 2014
2+
[FIX] Math: Vector2->Vec2, Vector3->Vec3, Vector4->Vec4, Matrix->Mat4
3+
[FIX] GLProgramState: Supports multitexturing
4+
[FIX] Studio:ActionObject: correct TotalTime of ActionObject
5+
16
cocos2d-x-3.1-alpha1 May.9 2014
27
[NEW] Animate: Dispatch a custom event after an animation frame is displayed
38
[NEW] GLProgram: Easy to customize uniforms and attributes by using the new class GLProgramState

build/cocos2d_libs.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,6 @@
10871087
3E92EA5E19215FA10094CD21 /* CCSprite3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E92EA5519215FA10094CD21 /* CCSprite3D.cpp */; };
10881088
3E92EA5F19215FA10094CD21 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5619215FA10094CD21 /* CCSprite3D.h */; };
10891089
3E92EA6019215FA10094CD21 /* CCSprite3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5619215FA10094CD21 /* CCSprite3D.h */; };
1090-
3E92EA6519215FA10094CD21 /* Textured.es2.frag.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5919215FA10094CD21 /* Textured.es2.frag.h */; };
1091-
3E92EA6619215FA10094CD21 /* Textured.es2.frag.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5919215FA10094CD21 /* Textured.es2.frag.h */; };
10921090
3E92EA6719215FA10094CD21 /* Textured.es2.vert.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5A19215FA10094CD21 /* Textured.es2.vert.h */; };
10931091
3E92EA6819215FA10094CD21 /* Textured.es2.vert.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E92EA5A19215FA10094CD21 /* Textured.es2.vert.h */; };
10941092
3E9B5E1119254D2C00BB28BC /* CCMeshCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E9B5E0F19254D2C00BB28BC /* CCMeshCommand.cpp */; };
@@ -2331,7 +2329,6 @@
23312329
3E92EA5419215FA10094CD21 /* Colored.es2.frag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Colored.es2.frag.h; path = ../cocos/3d/Colored.es2.frag.h; sourceTree = "<group>"; };
23322330
3E92EA5519215FA10094CD21 /* CCSprite3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCSprite3D.cpp; path = ../cocos/3d/CCSprite3D.cpp; sourceTree = "<group>"; };
23332331
3E92EA5619215FA10094CD21 /* CCSprite3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCSprite3D.h; path = ../cocos/3d/CCSprite3D.h; sourceTree = "<group>"; };
2334-
3E92EA5919215FA10094CD21 /* Textured.es2.frag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Textured.es2.frag.h; path = ../cocos/3d/Textured.es2.frag.h; sourceTree = "<group>"; };
23352332
3E92EA5A19215FA10094CD21 /* Textured.es2.vert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Textured.es2.vert.h; path = ../cocos/3d/Textured.es2.vert.h; sourceTree = "<group>"; };
23362333
3E9B5E0F19254D2C00BB28BC /* CCMeshCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMeshCommand.cpp; sourceTree = "<group>"; };
23372334
3E9B5E1019254D2C00BB28BC /* CCMeshCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMeshCommand.h; sourceTree = "<group>"; };
@@ -2830,6 +2827,9 @@
28302827
A07A4F3B178387670073F6A7 /* libchipmunk iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libchipmunk iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
28312828
A07A4F9E1783876B0073F6A7 /* libbox2d iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libbox2d iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
28322829
A07A4FB4178387730073F6A7 /* libCocosDenshion iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libCocosDenshion iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2830+
B2507B5B19255B9400FA4972 /* ccShader_3D_Color.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_Color.frag; sourceTree = "<group>"; };
2831+
B2507B5C19255B9400FA4972 /* ccShader_3D_ColorTex.frag */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_ColorTex.frag; sourceTree = "<group>"; };
2832+
B2507B5D19255B9400FA4972 /* ccShader_3D_PositionTex.vert */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = ccShader_3D_PositionTex.vert; sourceTree = "<group>"; };
28332833
B2AF2F8218EBAEAE00C5807C /* MathUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathUtil.cpp; sourceTree = "<group>"; };
28342834
B2AF2F8318EBAEAE00C5807C /* MathUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathUtil.h; sourceTree = "<group>"; };
28352835
B2AF2F8418EBAEAE00C5807C /* MathUtil.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MathUtil.inl; sourceTree = "<group>"; };
@@ -4078,7 +4078,6 @@
40784078
3E92EA5419215FA10094CD21 /* Colored.es2.frag.h */,
40794079
3E92EA5519215FA10094CD21 /* CCSprite3D.cpp */,
40804080
3E92EA5619215FA10094CD21 /* CCSprite3D.h */,
4081-
3E92EA5919215FA10094CD21 /* Textured.es2.frag.h */,
40824081
3E92EA5A19215FA10094CD21 /* Textured.es2.vert.h */,
40834082
3E92EA4C192130D70094CD21 /* CCSprite3DDataCache.cpp */,
40844083
3E92EA4D192130D70094CD21 /* CCSprite3DDataCache.h */,
@@ -4724,6 +4723,9 @@
47244723
5034CA5D191D591900CE6051 /* shaders */ = {
47254724
isa = PBXGroup;
47264725
children = (
4726+
B2507B5B19255B9400FA4972 /* ccShader_3D_Color.frag */,
4727+
B2507B5C19255B9400FA4972 /* ccShader_3D_ColorTex.frag */,
4728+
B2507B5D19255B9400FA4972 /* ccShader_3D_PositionTex.vert */,
47274729
5034CA60191D91CF00CE6051 /* ccShader_PositionTextureColor.vert */,
47284730
5034CA61191D91CF00CE6051 /* ccShader_PositionTextureColor.frag */,
47294731
5034CA62191D91CF00CE6051 /* ccShader_PositionTextureColor_noMVP.vert */,
@@ -5270,7 +5272,6 @@
52705272
1AD71EE7180E26E600808F54 /* spine-cocos2dx.h in Headers */,
52715273
1AD71EE9180E26E600808F54 /* spine.h in Headers */,
52725274
1AAF536C180E3374000584C8 /* HttpClient.h in Headers */,
5273-
3E92EA6519215FA10094CD21 /* Textured.es2.frag.h in Headers */,
52745275
1AAF536E180E3374000584C8 /* HttpRequest.h in Headers */,
52755276
500DC99019106300007B91BF /* CCRef.h in Headers */,
52765277
1AAF5370180E3374000584C8 /* HttpResponse.h in Headers */,
@@ -5808,7 +5809,6 @@
58085809
1A8C59CA180E930E00EF57C3 /* CCComRender.h in Headers */,
58095810
1A8C59CE180E930E00EF57C3 /* CCDataReaderHelper.h in Headers */,
58105811
1A8C59D2180E930E00EF57C3 /* CCDatas.h in Headers */,
5811-
3E92EA6619215FA10094CD21 /* Textured.es2.frag.h in Headers */,
58125812
ED9C6A9718599AD8000A5232 /* CCNodeGrid.h in Headers */,
58135813
1A8C59D6180E930E00EF57C3 /* CCDecorativeDisplay.h in Headers */,
58145814
1A01C69318F57BE800EFE3A6 /* CCDouble.h in Headers */,

cocos/2d/CCAction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ bool Follow::initWithTarget(Node *followedNode, const Rect& rect/* = Rect::ZERO*
215215
_boundaryFullyCovered = false;
216216

217217
Size winSize = Director::getInstance()->getWinSize();
218-
_fullScreenSize = Vector2(winSize.width, winSize.height);
218+
_fullScreenSize = Vec2(winSize.width, winSize.height);
219219
_halfScreenSize = _fullScreenSize * 0.5f;
220220

221221
if (_boundarySet)
@@ -257,9 +257,9 @@ void Follow::step(float dt)
257257
if(_boundaryFullyCovered)
258258
return;
259259

260-
Vector2 tempPos = _halfScreenSize - _followedNode->getPosition();
260+
Vec2 tempPos = _halfScreenSize - _followedNode->getPosition();
261261

262-
_target->setPosition(Vector2(clampf(tempPos.x, _leftBoundary, _rightBoundary),
262+
_target->setPosition(Vec2(clampf(tempPos.x, _leftBoundary, _rightBoundary),
263263
clampf(tempPos.y, _bottomBoundary, _topBoundary)));
264264
}
265265
else

cocos/2d/CCAction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ class CC_DLL Follow : public Action
277277
bool _boundaryFullyCovered;
278278

279279
// fast access to the screen dimensions
280-
Vector2 _halfScreenSize;
281-
Vector2 _fullScreenSize;
280+
Vec2 _halfScreenSize;
281+
Vec2 _fullScreenSize;
282282

283283
// world boundaries
284284
float _leftBoundary;

cocos/2d/CCActionCamera.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,58 +60,58 @@ ActionCamera * ActionCamera::reverse() const
6060

6161
void ActionCamera::restore()
6262
{
63-
_center = Vector3(0, 0, 0);
64-
_eye = Vector3(0, 0, FLT_EPSILON);
65-
_up = Vector3(0, 1, 0);
63+
_center = Vec3(0, 0, 0);
64+
_eye = Vec3(0, 0, FLT_EPSILON);
65+
_up = Vec3(0, 1, 0);
6666
}
6767

68-
void ActionCamera::setEye(const Vector3& eye)
68+
void ActionCamera::setEye(const Vec3& eye)
6969
{
7070
_eye = eye;
7171
updateTransform();
7272
}
7373

7474
void ActionCamera::setEye(float x, float y, float z)
7575
{
76-
_eye = Vector3(x, y, z);
76+
_eye = Vec3(x, y, z);
7777
updateTransform();
7878
}
7979

80-
void ActionCamera::setCenter(const Vector3& center)
80+
void ActionCamera::setCenter(const Vec3& center)
8181
{
8282
_center = center;
8383
updateTransform();
8484
}
8585

86-
void ActionCamera::setUp(const Vector3& up)
86+
void ActionCamera::setUp(const Vec3& up)
8787
{
8888
_up = up;
8989
updateTransform();
9090
}
9191

9292
void ActionCamera::updateTransform()
9393
{
94-
Matrix lookupMatrix;
95-
Matrix::createLookAt(_eye.x, _eye.y, _eye.z, _center.x, _center.y, _center.z, _up.x, _up.y, _up.z, &lookupMatrix);
94+
Mat4 lookupMatrix;
95+
Mat4::createLookAt(_eye.x, _eye.y, _eye.z, _center.x, _center.y, _center.z, _up.x, _up.y, _up.z, &lookupMatrix);
9696

97-
Vector2 anchorPoint = _target->getAnchorPointInPoints();
97+
Vec2 anchorPoint = _target->getAnchorPointInPoints();
9898

99-
bool needsTranslation = !anchorPoint.equals(Vector2::ZERO);
99+
bool needsTranslation = !anchorPoint.equals(Vec2::ZERO);
100100

101-
Matrix mv = Matrix::IDENTITY;
101+
Mat4 mv = Mat4::IDENTITY;
102102

103103
if(needsTranslation) {
104-
Matrix t;
105-
Matrix::createTranslation(anchorPoint.x, anchorPoint.y, 0, &t);
104+
Mat4 t;
105+
Mat4::createTranslation(anchorPoint.x, anchorPoint.y, 0, &t);
106106
mv = mv * t;
107107
}
108108

109109
mv = mv * lookupMatrix;
110110

111111
if(needsTranslation) {
112112

113-
Matrix t;
114-
Matrix::createTranslation(-anchorPoint.x, -anchorPoint.y, 0, &t);
113+
Mat4 t;
114+
Mat4::createTranslation(-anchorPoint.x, -anchorPoint.y, 0, &t);
115115
mv = mv * t;
116116
}
117117

cocos/2d/CCActionCamera.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,27 @@ class CC_DLL ActionCamera : public ActionInterval //<NSCopying>
6363
virtual ActionCamera *clone() const override;
6464

6565
/* sets the Eye value of the Camera */
66-
void setEye(const Vector3 &eye);
66+
void setEye(const Vec3 &eye);
6767
void setEye(float x, float y, float z);
6868
/* returns the Eye value of the Camera */
69-
const Vector3& getEye() const { return _eye; }
69+
const Vec3& getEye() const { return _eye; }
7070
/* sets the Center value of the Camera */
71-
void setCenter(const Vector3 &center);
71+
void setCenter(const Vec3 &center);
7272
/* returns the Center value of the Camera */
73-
const Vector3& getCenter() const { return _center; }
73+
const Vec3& getCenter() const { return _center; }
7474
/* sets the Up value of the Camera */
75-
void setUp(const Vector3 &up);
75+
void setUp(const Vec3 &up);
7676
/* Returns the Up value of the Camera */
77-
const Vector3& getUp() const { return _up; }
77+
const Vec3& getUp() const { return _up; }
7878

7979
protected:
8080

8181
void restore();
8282
void updateTransform();
8383

84-
Vector3 _center;
85-
Vector3 _eye;
86-
Vector3 _up;
84+
Vec3 _center;
85+
Vec3 _eye;
86+
Vec3 _up;
8787
};
8888

8989
/**

0 commit comments

Comments
 (0)