Liquidfun in cocos2d-x

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.

你可能感兴趣的:(Liquidfun in cocos2d-x)