Liquidfun in cocos2d-x

作者: 小城大麦 | 来源:发表于2016-01-18 18:17 被阅读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.

相关文章

网友评论

    本文标题:Liquidfun in cocos2d-x

    本文链接:https://www.haomeiwen.com/subject/caqckttx.html