bgfx-01-各个平台编译

2017-05-30  本文已影响0人  shany

原文链接:https://shanysheng.github.io/

bgfx

下载

mkdir bgfx
cd bgfx
git clone git://github.com/bkaradzic/bx.git
git clone git://github.com/bkaradzic/bimg.git
git clone git://github.com/bkaradzic/bgfx.git

目录结构:

GENie

GENie是bgfx用来生成各个平台工程文件的工具,类似cmake,不过相对来说还是小众,但从使用上来说还是挺好用。

Windows平台

编译

..\bx\tools\bin\windows\genie --with-examples vs2015

运行

   ../../.build/win64_vs2015/bin/example-06-bumpRelease

Linux平台

prerequisties

sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev

编译

Linux平台编译相对来说更简单一些,两种方法:

  1. 直接通过make命令;
  2. 通过genie命令手动生成gmake工程文件,实际上直接通过make的方式也是内部调用genie生成gmake,采用genie相对来说更多的参数可以选择

make

make linux-Debug64 
make linux-Release64

genie

../bx/tools/bin/linux/genie

运行

Android

vim ~/.bashrc
make android-arm
make android-x86
make android-mips

Mac编译

make

make osx

genie

../bx/tools/bin/darwin/genie --with-examples --xcode=osx xcode4

运行

../../.build/osx64_clang/bin/example-06-bump.app/Contents/MacOS/example-06-bumpRelease

iOS编译

make

![bgfx-01-genie-vs2015.png](https://img.haomeiwen.com/i37436/4114d2947e0ab2fd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

make ios-arm64
make ios-arm

genie

../bx/tools/bin/darwin/genie --with-examples --xcode=ios xcode4

运行

ios运行需要将资源打包打.app里面,所以需要:

上一篇 下一篇

猜你喜欢

热点阅读