Liquidfun in cocos2d-x
2016-01-18 本文已影响108人
小城大麦
Download
$ git clone https://github.com/cocos2d/cocos2d-x-samples.git
$ cd cocos2d-x-samples
$ python download-engine.py
$ cd ../
$ git clone https://github.com/google/liquidfun.git liquidfun
$ cp -R liquidfun cocos2d-x-samples/libs/liquidfun/liquidfun/
For windows
- change link lib freetype120.lib to freetype.lib
- add \n for macro in shader content of LFParticleSystemNode.cpp,windows default line break is not \n but \r\n
- add glEnable(GL_POINT_SPRITE) in AppDelegate.cpp. You have to enable GL_POINT_SPRITE in windows platform to let gl_PointCoord's be right, otherwise, gl_PointCoord's value will be zero.
For mac
- Add ApplicatonServices.framework to linked framworks
- Add code snippet in "GLProgram::compileShader" for compile shader in mac correctly.
...
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
"#version 120\n",
#endif
For iOS Simulator
- Replace external/freetype/prebuilt by prebuilt in cocos2d-x-3.8.1 version.