Posts
Search
Contact
Cookies
About
RSS

Getting traction with BGFX...

Added 6 Apr 2021, 7:48 p.m. edited 18 Jun 2023, 1:12 a.m.
what a horrible texture!

Well while BGFX is an amazing renderer library, I don't mind admitting I've found the initial learning curve fairly steep! Let me explain what I'm intending to do with BGFX (and you'd be forgiven for thinking I'm a masochist ! )

BGFX has a C API which is primarily intended for people to use when they wrap BGFX for another language, however my favourite language of choice is plain old C (either C99 or C11 depending on if I'm contributing code). Looking at a few of the bindings for different languages, I noticed that some also wrapped part of the examples glue code, I quite sure that the example glue code was never intended to become almost a de facto part of BGFX...

So I've set myself a goal with BGFX I want to use BGFX as solely a renderer, wrap no C++ code from the examples (it was a little tempting to be lazy!) and use only the C API of BGFX. You might have seen my previous post, starting out with BGFX's C API, well I've just loaded my first Wavefront OBJ mesh and rendered it with BGFX! This is using a scratch written OBJ loader I wrote some time ago, so its all C and if it breaks I have only myself to blame...

Its still early days, I want to couple the OBJ loader a little bit to BGFX so it can hand back a "Model" object with all the various handles ready for submitting to the renderer, and at the moment I'm only handling a single mesh - I intend to have a mesh per material in the OBJ model.

So watch this space, it won't be soon, I'm busy with work, but still I'm chuffed to have got his far already!