美文网首页
bgfx 编译样例(0)

bgfx 编译样例(0)

作者: ansey | 来源:发表于2021-07-14 01:44 被阅读0次

bgfx 是一个开源跨平台渲染引擎库.
官方文档

目标:编译bgfx样例源码成可运行程序

环境:

  • 系统:windows10
  • IDE VS 2019

前置准备

目录结构

生成vs工程

  • 进入到 bgfx 目录下
cd bgfx 
  • genie 生成vs工程
    生成后的vs工程所在目录为 bgfx\.build\projects\vs2015
..\bx\tools\bin\windows\genie --with-examples vs2015

编译一个简单样例 (01-cubes)

  • vs IDE打开 .build\projects\vs2015\bgfx.sln
  • 选中cubes样例项目
选中 cubes项目
  • 执行生成
    生成后目录为 .build\win32_vs2015\bin
vs 中执行生成
  • 运行样例程序 example-01-cubesDebug.exe
    此时运行 example-01-cubesDebug.exe 会失败,需要放入 bgfx\examples\runtime\ 中运行即可.


    cubes样例运行效果

下一篇 bgfx 编译shader

相关文章

网友评论

      本文标题:bgfx 编译样例(0)

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