2014-12-24 14:33:41 +08:00
# cocos2d-x v3.4 Release Notes #
2014-01-07 08:33:14 +08:00
2014-01-07 08:26:48 +08:00
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
2014-12-24 14:36:50 +08:00
- [cocos2d-x v3.4 Release Notes ](# )
2014-12-12 15:39:16 +08:00
- [Misc Information ](# )
- [Requirements ](# )
- [Runtime Requirements ](# )
- [Compiler Requirements ](# )
- [How to run tests ](# )
- [Mac OSX & iOS ](# )
- [Android ](# )
- [Windows ](# )
- [Linux ](# )
- [How to start a new game ](# )
2014-12-24 14:36:50 +08:00
- [v3.4beta0 ](# )
- [Highlights of v3.4beta0 ](# )
2014-12-12 15:39:16 +08:00
- [Features in detail ](# )
2014-05-20 08:02:30 +08:00
2014-01-07 08:23:06 +08:00
# Misc Information
2014-12-12 15:37:27 +08:00
* Full Changelog: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.3/CHANGELOG
2014-05-20 07:56:33 +08:00
* v3.0 Release Notes can be found here: [v3.0 Release Notes ](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md )
2014-01-07 08:23:06 +08:00
# Requirements
## Runtime Requirements
* Android 2.3 or newer
* iOS 5.0 or newer
* OS X 10.7 or newer
* Windows 7 or newer
2014-05-20 07:56:33 +08:00
* Windows Phone 8 or newer
2014-07-06 20:53:17 +08:00
* Linux Ubuntu 14.04 or newer
2014-01-07 08:23:06 +08:00
## Compiler Requirements
2014-07-16 11:26:21 +08:00
* Xcode 5.1 or newer for iOS or Mac
2014-07-06 20:53:17 +08:00
* gcc 4.9 or newer for Linux
2014-11-29 13:20:21 +08:00
* ndk-r10c for Android
2014-05-20 07:56:33 +08:00
* Visual Studio 2012 or newer for Windows (win32)
* Visual Studio 2012 or newer for Windows Phone 8
2014-01-07 08:23:06 +08:00
2014-04-21 14:50:27 +08:00
## How to run tests
2014-03-04 18:15:30 +08:00
### Mac OSX & iOS
* Enter `cocos2d-x/build` folder, open `cocos2d_test.xcodeproj`
* Select `iOS` or `OS X` target in scheme toolbar
* Click `run` button
### Android
2014-03-07 08:37:33 +08:00
You can run the samples...
2014-03-04 18:15:30 +08:00
2014-03-07 08:37:33 +08:00
**Using command line:**
2014-03-04 18:15:30 +08:00
$ cd cocos2d-x
2014-03-06 14:44:33 +08:00
$ ./setup.py
2014-03-04 18:15:30 +08:00
$ cd build
2014-03-14 15:01:11 +08:00
$ ./android-build.py cpp-empty-test -p 10
$ adb install cocos2d-x/tests/cpp-empty-test/proj.android/bin/CppEmptyTest-debug.apk
2014-03-04 18:15:30 +08:00
Then click item on Android device to run tests. Available value of `-p` is the API level, cocos2d-x supports from level 10.
2014-03-07 08:37:33 +08:00
**Using Eclipse:**
2014-03-04 18:15:30 +08:00
$ cd cocos2d-x
2014-03-06 14:44:33 +08:00
$ ./setup.py
2014-03-04 18:15:30 +08:00
$ cd build
2014-03-14 15:01:11 +08:00
$ ./android-build.py cpp-empty-test -p 10
2014-03-04 18:15:30 +08:00
Then
* Import cocos2d-x Android project into Eclipse, the path used to import is `cocos/2d/platform/android`
2014-03-14 15:01:11 +08:00
* Import `cpp-empty-test` Android project into Eclipse, the path used to import is `tests/cpp-empty-test/proj.android`
* Build `cpp-empty-test` Android project and run
2014-03-04 18:15:30 +08:00
### Windows
* Enter `cocos2d-x/build` , and open `cocos2d-win32.vs2012.sln`
2014-03-14 15:01:11 +08:00
* Select `cpp-empty-test` as running target
2014-03-04 18:15:30 +08:00
* Click run button
### Linux
$ cd cocos2d-x/build
$ ./install-deps-linux.sh
$ cd ../..
Then
$ mkdir build
$ cd build
2014-03-14 15:01:11 +08:00
$ cmake ../cocos2d-x
2014-03-04 18:15:30 +08:00
$ make -j4
Run
2014-03-14 15:01:11 +08:00
$ cd bin/cpp-empty-test
$ ./cpp-empty-test
2014-03-04 18:15:30 +08:00
2014-03-06 14:44:33 +08:00
## How to start a new game
2014-05-20 08:05:05 +08:00
Please refer to this document: [ReadMe ](../README.md )
2014-03-04 18:15:30 +08:00
2014-12-12 15:31:47 +08:00
2014-12-24 14:33:41 +08:00
# v3.4beta0
2014-12-12 15:31:47 +08:00
2014-12-24 14:33:41 +08:00
## Highlights of v3.4beta0
2014-12-12 15:31:47 +08:00
2014-12-05 20:47:15 +08:00
2014-10-17 15:26:28 +08:00
2014-12-12 15:31:47 +08:00
## Features in detail
2014-10-17 15:26:28 +08:00
2014-12-25 17:46:05 +08:00
### Create Sprite3D asynchronously
2014-12-25 17:40:26 +08:00
It allows to load Sprite3D in another thread so that you can process more logic in the main thread. And it notifies you using a custom callback after creating is finished.
`modelPath` is the file to be loaded, `AsyncLoadSprite3DTest::asyncLoad_Callback` is the user's callback function, `userParam` is the parameter that the callback function is wanted.
```c++
Sprite3D::createAsync(modelPath, CC_CALLBACK_2(AsyncLoadSprite3DTest::asyncLoad_Callback, this), (void*)userParam);
```
The callback function is called after loading Sprite3D, the callback function can be something like this,
```c++
void AsyncLoadSprite3DTest::asyncLoad_Callback(Sprite3D* sprite, void* param)
{
//sprite is the loaded sprite
sprite->setPosition(point);
addChild(sprite);
}
```
2014-10-17 15:26:28 +08:00
2014-12-29 10:50:57 +08:00
### Frustum culling
Frustum culling means only the stuff that is inside the frustum is sent to the graphics hardware. It can potentially improve the performance of the application since only the vertices that are part of the visible part of the 3D world are kept on the graphics card memory.
Frustum culling is a property of camera, it is enabled by default. And you can use the following to enable or disable the frustum culling,
```c++
//the first parameter is enable frustum culling or not, the second means that frustum culling using near and far plan or not.
camera->enableFrustumCulling(true, true);
```
Note that when you can make sure that all the stuff is inside the frustum you can turn off the frustum culling.
For more infomation please reffer to the cpptests/CameraTest