Giter Site home page Giter Site logo

laowan / bgfx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bkaradzic/bgfx

0.0 0.0 0.0 224.4 MB

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

Home Page: https://bkaradzic.github.io/bgfx/overview.html

License: BSD 2-Clause "Simplified" License

C++ 52.05% Makefile 0.61% SuperCollider 0.14% Shell 0.96% C 25.03% Objective-C++ 3.48% Lua 5.53% Objective-C 0.60% Scala 0.10% C# 3.47% D 4.83% HyPhy 3.18%

bgfx's Introduction

当前项目是基于 OpenGL 开发的,计划是把渲染 API 替换为 bgfx,有下面几个限制:

1、渲染上下文是上层创建,bgfx 内部直接复用不需要另外创建

这种情况 bgfx 提供了一种解决方案,是在 bgfx::init 的时候传入 platformData.nwh 窗口句柄,以及 platformData.context 渲染上下文,如果两者都有传入,那么 bgfx 内部就不会重新创建。

2、前后缓存切换是上层控制,bgfx 不用理会

目前 bgfx 内部会在调用 renderFrame 时 swapbuffer,这个逻辑需要修改 bgfx 的代码去掉。

3、兼容之前的 gl shader

对于跨平台 shader 代码,bgfx 的方案是采用自定义语法写一套代码,然后通过 shaderc 工具编译出各个平台的代码,供各个不同的 API 使用。因为目前项目存在大量 glsl shader 代码,如果用 bgfx 的语法全部重新,工作量很大,如果要兼容,那么需要修改 bgfx 创建 shader 的代码,直接支持读取编译 glsl shader。如果输入 shader 是 glsl 写的,那么底层只能使用 gl 渲染,只用输入 shader 是 bgfx 语法写的才支持其他图形 API。

bgfx's People

Contributors

bkaradzic avatar dariomanesku avatar attilaz avatar jeremieroy avatar mikepopoloski avatar cloudwu avatar mmicko avatar mendsley avatar hugoam avatar kingscallop avatar pezcode avatar juj avatar vvuk avatar olliwang avatar cedricguillemet avatar rinthel avatar bwrsandman avatar selfshadow avatar velro avatar kondrak avatar stuartcarnie avatar velkyel avatar nodrev avatar benoitjacquier avatar andr3wmac avatar blaztinn avatar jpcy avatar goodartistscopy avatar julianxhokaxhiu avatar junjie020 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.