bindbc-bgfx 0.2.0+104

Dynamic and static D bindings for bgfx.


To use this package, run the following command in your project's root directory:

bindbc-bgfx

Dynamic and static D bindings for bgfx.

These bindings target bgfx API version 104 (commit 387ac7fc25e4322bac3ac16f4fb0aa3e3bdbbeb2).

Usage (DUB)

To install this library with DUB, simply run the following commands:

dub add bindbc-bgfx
dub add bindbc-loader

The library is configured to dynamic configuration by default, and should work out of box if you have the dynamic library installed properly.

For static linking, static configuration must be enabled:

dub.json

"subConfigurations": {
	"bindbc-bgfx": "static"
}

"libs": {
	"bgfxRelease", "bxRelease", "bimgRelease"
}

The bindings also support -betterC, which can be enabled with staticBC and dynamicBC configurations.

Sample

import bindbc.bgfx;

loadBgfx(); // required with dynamically linked bgfx

bgfx_init_t init;
bgfx_init_ctor(&init);

bgfx_init(&init);
bgfx_reset(1280, 720, BGFX_RESET_NONE, init.resolution.format);

bgfx_shutdown();

unloadBgfx(); // optional, only with dynamically linked bgfx

Generating bindings

The bindings can be regenerated manually by running genie idl in bgfx project folder, and copying the generated files from bgfx/bindings/d/ over the files in bindbc-bgfx/source/bindbc/bgfx.

Authors:
  • Ari Vuollet
Dependencies:
none
Versions:
0.2.0+104 2020-Mar-21
0.1.1 2019-Oct-08
0.1.0 2019-Sep-29
~master 2020-Mar-21
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 2 downloads this month

  • 22 downloads total

Score:
1.0
Short URL:
bindbc-bgfx.dub.pm