2
0

overview.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. Overview
  2. ========
  3. What is it?
  4. -----------
  5. Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library,
  6. licensed under permissive BSD-2 clause open source license.
  7. .. raw:: html
  8. <p>
  9. <iframe src="https://ghbtns.com/github-btn.html?user=bkaradzic&repo=bgfx&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
  10. <iframe src="https://ghbtns.com/github-btn.html?user=bkaradzic&repo=bgfx&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="158px" height="30px"></iframe>
  11. </p>
  12. Supported rendering backends
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. - Direct3D 11
  15. - Direct3D 12
  16. - GNM (only for licensed PS4 developers, search DevNet forums for source)
  17. - Metal
  18. - OpenGL 2.1
  19. - OpenGL 3.1+
  20. - OpenGL ES 2
  21. - OpenGL ES 3.1
  22. - Vulkan
  23. - WebGL 1.0
  24. - WebGL 2.0
  25. Supported Platforms
  26. ~~~~~~~~~~~~~~~~~~~
  27. - Android (4.0+) - API 14 or later
  28. - iOS/iPadOS/tvOS (16.0+)
  29. - Linux (both X11 and Wayland)
  30. - macOS (13.0+)
  31. - PlayStation 4
  32. - RaspberryPi
  33. - UWP (Universal Windows, Xbox One)
  34. - Wasm/Emscripten
  35. - Windows (7+)
  36. Supported Compilers
  37. ~~~~~~~~~~~~~~~~~~~
  38. - Clang 11 and above
  39. - GCC 11 and above
  40. - VS2022 and above
  41. - Apple clang 12 and above
  42. Supported Languages
  43. ~~~~~~~~~~~~~~~~~~~
  44. - `C/C++ API documentation <https://bkaradzic.github.io/bgfx/bgfx.html>`__
  45. - `Beef API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/bf>`__
  46. - `C# language API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/cs>`__
  47. - `C3 language API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/c3>`__
  48. - `D language API bindings <https://github.com/BindBC/bindbc-bgfx>`__
  49. - `Go language API bindings <https://github.com/james4k/go-bgfx>`__
  50. - `Haskell language API bindings <https://github.com/haskell-game/bgfx>`__
  51. - `Lightweight Java Game Library 3 bindings <https://github.com/LWJGL/lwjgl3#lwjgl---lightweight-java-game-library-3>`__
  52. - `Lua language API bindings <https://github.com/cloudwu/lua-bgfx>`__
  53. - `Nim language API bindings <https://github.com/Halsys/nim-bgfx>`__
  54. - `Pascal language API bindings <https://github.com/Akira13641/PasBGFX>`__
  55. - `Python language API bindings #1 <https://github.com/fbertola/bgfx-python#-----bgfx-python-->`__
  56. - `Python language API bindings #2 <https://github.com/jnadro/pybgfx#pybgfx>`__
  57. - `Rust language API bindings <https://github.com/rhoot/bgfx-rs#bgfx-rs>`__
  58. - `Swift language API bindings <https://github.com/stuartcarnie/SwiftBGFX>`__
  59. - `Zig language API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/zig>`__
  60. Project Page
  61. ~~~~~~~~~~~~
  62. - https://github.com/bkaradzic/bgfx
  63. Contact
  64. ~~~~~~~
  65. - `GitHub Discussions <https://github.com/bkaradzic/bgfx/discussions>`__
  66. - `Discord Chat <https://discord.gg/9eMbv7J>`__
  67. - GitHub `@bkaradzic <https://github.com/bkaradzic>`__
  68. - Twitter `@bkaradzic <https://twitter.com/bkaradzic>`__
  69. Debugging and Profiling
  70. -----------------------
  71. RenderDoc
  72. ~~~~~~~~~
  73. Loading of RenderDoc is integrated in bgfx when using DX11 or OpenGL
  74. renderer. You can drop in ``renderdoc.dll`` from RenderDoc distribution
  75. into working directory, and it will be automatically loaded during bgfx
  76. initialization. This allows frame capture at any time by pressing
  77. **F11**.
  78. Download: `RenderDoc <https://renderdoc.org/builds>`__
  79. RenderDoc `How do I ...? <https://renderdoc.org/docs/how/index.html>`__ documentation.
  80. `Shader debugging <https://software.intel.com/en-us/articles/shader-debugging-for-bgfx-rendering-engine>`__
  81. with RenderDoc and MSVC.
  82. SDL, GLFW, etc.
  83. ---------------
  84. It is possible to use bgfx with SDL, GLFW and similar cross platform
  85. windowing libraries. The main requirement is that windowing library
  86. provides access to native window handle that's used to create Direct3D
  87. device or OpenGL context.
  88. For more info see: :doc:`bgfx`.
  89. .. note:: You can use ``--with-sdl`` when running GENie to enable SDL2 integration with examples:
  90. ``genie --with-sdl vs2012``
  91. .. note:: ``--with-glfw`` is also available, but it's just simple stub to be used to test GLFW
  92. integration API.
  93. .. note:: Special care is necessary to make custom windowing to work with multithreaded renderer.
  94. Each platform has rules about where renderer can be and how multithreading interacts
  95. with context/device. To disable multithreaded render use ``BGFX_CONFIG_MULTITHREADED=0``
  96. preprocessor define.
  97. Getting Involved
  98. ----------------
  99. Everyone is welcome to contribute to bgfx by submitting bug reports, testing on different
  100. platforms, writing examples (see `ideas <https://github.com/bkaradzic/bgfx/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+needed%22>`__),
  101. improving documentation, profiling and optimizing, etc.
  102. .. note:: **When contributing to the bgfx project you must agree to the BSD 2-clause
  103. licensing terms.**
  104. Contributors
  105. ~~~~~~~~~~~~
  106. Chronological order:
  107. - Branimir Karadžić (`@bkaradzic <https://github.com/bkaradzic>`__)
  108. - Garett Bass (`@garettbass <https://github.com/garettbass>`__) - macOS port.
  109. - Jeremie Roy (`@jeremieroy <https://github.com/jeremieroy>`__) -
  110. `10-font <examples.html#font>`__,
  111. and `11-fontsdf <examples.html#fontsdf>`__ examples.
  112. - Miloš Tošić (`@milostosic <https://github.com/milostosic>`__) -
  113. `12-lod <examples.html#lod>`__ example.
  114. - Dario Manesku (`@dariomanesku <https://github.com/dariomanesku>`__) -
  115. `13-stencil <examples.html#stencil>`__,
  116. `14-shadowvolumes <examples.html#shadowvolumes>`__,
  117. `15-shadowmaps-simple <examples.html#shadowmaps-simple>`__,
  118. `16-shadowmaps <examples.html#shadowmaps>`__,
  119. `18-ibl <examples.html#ibl>`__,
  120. and `28-wireframe <examples.html#wireframe>`__ example.
  121. - James Gray (`@james4k <https://github.com/james4k>`__) - Go language API bindings.
  122. - Guillaume Piolat (`@p0nce <https://github.com/p0nce>`__) - D language API bindings.
  123. - Mike Popoloski (`@MikePopoloski <https://github.com/MikePopoloski>`__) - C#/VB/F# language API
  124. bindings, WinRT/WinPhone support.
  125. - Kai Jourdan (`@questor <https://github.com/questor>`__) -
  126. `23-vectordisplay <examples.html#vectordisplay>`__ example.
  127. - Stanlo Slasinski (`@stanlo <https://github.com/stanlo>`__) -
  128. `24-nbody <examples.html#nbody>`__ example.
  129. - Daniel Collin (`@emoon <https://github.com/emoon>`__) - Port of Ocornut's ImGui to bgfx.
  130. - Andre Weissflog (`@floooh <https://github.com/floooh>`__) - Alternative build system fips.
  131. - Andrew Johnson (`@ajohnson23 <https://github.com/ajohnson23>`__) - TeamCity build.
  132. - Tony McCrary (`@enleeten <https://github.com/enleeten>`__) - Java language API bindings.
  133. - Attila Kocsis (`@attilaz <https://github.com/attilaz>`__) - Metal rendering backend, various macOS
  134. and iOS improvements and bug fixes, `39-assao <examples.html#assao>`__ example.
  135. - Richard Gale (`@RichardGale <https://github.com/RichardGale>`__) - Emscripten entry input
  136. handling.
  137. - Andrew Mac (`@andr3wmac <https://github.com/andr3wmac>`__) -
  138. `27-terrain <examples.html#terrain>`__ example.
  139. - Oliver Charles (`@ocharles <https://github.com/ocharles>`__) - Haskel language API bindings.
  140. - Johan Sköld (`@rhoot <https://github.com/rhoot>`__) - Rust language API bindings.
  141. - Jean-François Verdon (`@Nodrev <https://github.com/Nodrev>`__) - Alternative deployment for
  142. Android.
  143. - Jason Nadro (`@jnadro <https://github.com/jnadro>`__) - Python language API bindings.
  144. - Krzysztof Kondrak (`@kondrak <https://github.com/kondrak>`__) - OculusVR integration.
  145. - Colby Klein (`@excessive <https://github.com/excessive>`__) - Lua language API bindings.
  146. - Stuart Carnie (`@stuartcarnie <https://github.com/stuartcarnie>`__) - Swift language API
  147. bindings.
  148. - Joseph Cherlin (`@jcherlin <https://github.com/jcherlin>`__) -
  149. `30-picking <examples.html#picking>`__,
  150. and `31-rsm <examples.html#rsm>`__ example.
  151. - Olli Wang (`@olliwang <https://github.com/olliwang>`__) - Various NanoVG integration improvements.
  152. - Cory Golden (`@Halsys <https://github.com/Halsys>`__) - Nim language API bindings.
  153. - Camilla Berglund (`@elmindreda <https://github.com/elmindreda>`__) - GLFW support.
  154. - Daniel Ludwig (`@code-disaster <https://github.com/code-disaster>`__) - Lightweight Java Game
  155. Library 3 bindings.
  156. - Benoit Jacquier (`@benoitjacquier <https://github.com/benoitjacquier>`__) - Added support for
  157. cubemap as texture 2D array in a compute shader.
  158. - Apoorva Joshi (`@ApoorvaJ <https://github.com/ApoorvaJ>`__) -
  159. `33-pom <examples.html#pom>`__ example.
  160. - Stanislav Pidhorsky (`@podgorskiy <https://github.com/podgorskiy>`__) -
  161. `36-sky <examples.html#sky>`__ example.
  162. - 云风 (`@cloudwu <https://github.com/cloudwu>`__) - Alternative Lua bindings, bgfx IDL scripts,
  163. `42-bunnylod <examples.html#bunnylod>`__ example.
  164. - Kostas Anagnostou (`@KostasAAA <https://github.com/KostasAAA>`__) -
  165. `37-gpudrivenrendering <examples.html#gpudrivenrendering>`__ example.
  166. - Andrew Willmott (`@andrewwillmott <https://github.com/andrewwillmott>`__) - ATC and ASTC support.
  167. - Aleš Mlakar (`@jazzbre <https://github.com/jazzbre>`__) -
  168. `40-svt <examples.html#svt>`__ example.
  169. - Matt Chiasson (`@mchiasson <https://github.com/mchiasson>`__) - Various fixes and improvements.
  170. - Phil Peron (`@pperon <https://github.com/pperon>`__) - Tutorial how to use bgfx API.
  171. - Vincent Cruz (`@BlockoS <https://github.com/BlockoS>`__) - Wayland support.
  172. - Jonathan Young (`@jpcy <https://github.com/jpcy>`__) - Renderer for ioquake3 that uses bgfx,
  173. minimal bgfx example.
  174. - Nick Waanders (`@NickWaanders <https://github.com/NickWaanders>`__) - shaderc: Metal fixes.
  175. - Vladimir Vukićević (`@vvuk <https://github.com/vvuk>`__) - HTML5 context.
  176. - Daniel Gavin (`@DanielGavin <https://github.com/DanielGavin>`__) - `41-tess <examples.html#tess>`__ example.
  177. - Ji-yong Kwon (`@rinthel <https://github.com/rinthel>`__) - Vulkan rendering backend.
  178. - Leandro Freire (`@leandrolfre <https://github.com/leandrolfre>`__).
  179. - Ari Vuollet (`@GoaLitiuM <https://github.com/GoaLitiuM>`__) IDL generator for D language
  180. bindings.
  181. - Sebastian Marketsmueller (`@sebastianmunity3d <https://github.com/sebastianmunity3d>`__).
  182. - Cedric Guillemet (`@CedricGuillemet <https://github.com/CedricGuillemet>`__).
  183. - Pablo Escobar (`@pezcode <https://github.com/pezcode>`__) - Various Vulkan fixes.
  184. - Paul Gruenbacher (`@pgruenbacher <https://github.com/pgruenbacher>`__) - Various bug fixes.
  185. - Jukka Jylänki (`@juj <https://github.com/juj>`__) - Various WebGL optimizations and fixes.
  186. - Hugo Amnov (`@hugoam <https://github.com/hugoam>`__) - WebGPU/Dawn rendering backend.
  187. - Christophe Dehais (`@goodartistscopy <https://github.com/goodartistscopy>`__) - Various bug fixes.
  188. - elvencache (`@elvencache <https://github.com/elvencache>`__) -
  189. `43-denoise <examples.html#denoise>`__,
  190. `44-sss <examples.html#sss>`__,
  191. and `45-bokeh <examples.html#bokeh>`__ example.
  192. - Richard Schubert (`@Hemofektik <https://github.com/Hemofektik>`__) - `46-fsr <examples.html#fsr>`__ example.
  193. - Sandy Carter (`@bwrsandman <https://github.com/bwrsandman>`__) - `47-pixelformats
  194. <examples.html#pixelformats>`__ example, and various fixes and improvements.
  195. - Liam Twigger (`@SnapperTT <https://github.com/SnapperTT>`__) - `48-drawindirect <examples.html#drawindirect>`__ example.
  196. - Preetish Kakkar (`@blackhole <https://github.com/preetishkakkar>`__) - `49-hextile <examples.html#49-hextile>`__ example.
  197. - Biswapriyo Nath (`@Biswa96 <https://github.com/Biswa96>`__) - GitHub Actions CI.
  198. - Raziel Alphadios (`@RazielXYZ <https://github.com/RazielXYZ>`__) - Various fixes and improvements.
  199. - IchorDev (`@IchorDev <https://github.com/ichordev>`__) - Improved D language bindings.
  200. - Martijn Courteaux (`@Martijn Courteaux <https://github.com/mcourteaux>`__) - Various fixes and improvements.
  201. - JazielGuerrero (`@JazielGuerrero <https://github.com/JazielGuerrero>`__) - C3 language bindings.
  202. and `others <https://github.com/bkaradzic/bgfx/graphs/contributors>`__...
  203. Repository visualization
  204. ~~~~~~~~~~~~~~~~~~~~~~~~
  205. .. image:: https://api.star-history.com/svg?repos=bkaradzic/bgfx&type=Date
  206. .. raw:: html
  207. <p>
  208. <iframe width="694" height="390" src="https://www.youtube.com/embed/5ZeN_d_-BHo" frameborder="0" allowfullscreen></iframe>
  209. </p>