Trên GitHub, bkaradzic/bgfx.cmake-archived đã đạt 265 sao, ngôn ngữ CMake. CMake build scripts for bgfx. Released under public domain.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
NOTE: This port only made to be used as C++ library, some features (such as bindings) might not work! For those features, please use original repo with GENie instead.
This repo contains cmake configuration files that can be used to build bgfx with CMake.
If downloading via zip (instead of using git submodules) manually download bx, bimg and bgfx and copy them into the root directory, or locate them via BX_DIR, BIMG_DIR and BGFX_DIR CMake variables.
How To Use
This project is setup to be included a few different ways. To include bgfx source code in your project simply use add_subdirectory to include this project. To build bgfx binaries build the INSTALL target (or make install). The installed files will be in the directory specified by CMAKE_INSTALL_PREFIX which we recommend you set to ./install so it will export to your build directory. Note you may want to build install on both Release and Debug configurations.
Features
No outside dependencies besides bx, bimg, bgfx, and CMake.
Detects shader modifications and automatically rebuilds them for all examples.
Added cmake commands
bgfx.cmake will install bgfxToolUtils.cmake which has useful cmake functions for using bgfx's tools:
bgfx_compile_binary_to_header
Add a build rule for a binary file to the generated build system using bin2c.
bgfx_compile_binary_to_header(
INPUT_FILE filename
OUTPUT_FILE filename
ARRAY_NAME name
)
This defines a bin2c command to generate a specified OUTPUT_FILE header with an array ARRAY_NAME with the binary representation of a INPUT_FILE file.
Adding these INPUT_FILE as source files to a target will run bin2c at build time and they will rebuild if either the contents of the INPUT_FILE change.
This defines a shaderc command to generate binaries or headers for a number of TYPE shaders with SHADERS files and VARYING_DEF file in the OUTPUT_DIR directory. There will be one generated shader for each supported rendering API on this current platform according to the BGFX_EMBEDDED_SHADER macro in bgfx/embedded_shader.h for headers and in the directory expected by load_shader in bgfx_utils.h.
The generated headers will have names in the format of ${RENDERING_API}/${SHADERS}.bin[.h] where RENDERING_API can be glsl, essl, spv, dx11 and mtl depending on the availability of the platform.
Adding these SHADERS as source files to a target will run shaderc at build time and they will rebuild if either the contents of the SHADERS or the VARYING_DEF change.
Examples: Generating shaders as headers
bgfx_compile_shaders(
TYPE VERTEX
SHADERS vs.sc
VARYING_DEF varying.def.sc
OUTPUT_DIR ${CMAKE_BINARY_DIR}/include/generated/shaders
AS_HEADERS
)
bgfx_compile_shaders(
TYPE FRAGMENT
SHADERS fs.sc
VARYING_DEF ${CMAKE_SOURCE_DIR}/varying.def.sc
OUTPUT_DIR ${CMAKE_BINARY_DIR}/include/generated/shaders
AS_HEADERS
)
add_library(myLib main.cpp vs.sc fs.sc)
target_include_directories(myLib ${CMAKE_BINARY_DIR}/include/generated/shaders)
Probably! This project needs to be updated if a dependency is added or the bgfx build system changes. The bgfx repository is very active but these types of changes are rare. New examples have to be added manually as well, but not doing so will merely result in that example not showing up and won't break anything else. If pulling latest causes issues, be sure to manually reconfigure CMake as the glob patterns may need to be refreshed (the use of glob patterns in CMake is generally discouraged but in this project it helps to ensure upwards compatibilty with newer bgfx updates).
bkaradzic/bgfx.cmake-archived có 265 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/bkaradzic/bgfx.cmake-archived. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
bkaradzic/bgfx.cmake-archived có những chủ đề gì?
GitHub topics của bkaradzic/bgfx.cmake-archived: "bgfx", "cmake". TopGit xếp repo vào nhóm mã nguồn mở.
bkaradzic/bgfx.cmake-archived có phải mã nguồn mở không?
Có — bkaradzic/bgfx.cmake-archived phát hành theo license CC0-1.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/bkaradzic/bgfx.cmake-archived.
bkaradzic/bgfx.cmake-archived có trang demo không?
Dự án có trang chủ ở https://bkaradzic.github.io/bgfx/index.html. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
bkaradzic/bgfx.cmake-archived còn đang phát triển không?
Commit gần nhất trên bkaradzic/bgfx.cmake-archived là 9 tháng trước (theo timestamp GitHub). Repo có 109 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc thêm về bkaradzic/bgfx.cmake-archived ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/bkaradzic/bgfx.cmake-archived là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
bgfx.cmake-archived có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về bgfx.cmake-archived.