New auto-generated D bindings (#3114)

* Added shaderc default defines to docs

* Update tools.rst

* Update tools.rst

* WIP new D bindings

* New bindings "nearly done"

* More unfinished changes

* Nearly done; ctors still don't work

* Bindings auto-generation is done

* New auto-generated D bindings

* Reduced D bindings file count back to 2

---------

Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
This commit is contained in:
IchorDev 2023-06-27 01:21:22 +07:00 committed by GitHub
parent c913c2e76a
commit cbd83f57ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 4381 additions and 5979 deletions

View File

@ -72,7 +72,7 @@ Languages:
* [C/C++ API documentation](https://bkaradzic.github.io/bgfx/bgfx.html) * [C/C++ API documentation](https://bkaradzic.github.io/bgfx/bgfx.html)
* [Beef API bindings](https://github.com/bkaradzic/bgfx/tree/master/bindings/bf) * [Beef API bindings](https://github.com/bkaradzic/bgfx/tree/master/bindings/bf)
* [C# language API bindings #1](https://github.com/bkaradzic/bgfx/tree/master/bindings/cs) * [C# language API bindings #1](https://github.com/bkaradzic/bgfx/tree/master/bindings/cs)
* [D language API bindings](https://github.com/GoaLitiuM/bindbc-bgfx) * [D language API bindings](https://github.com/BindBC/bindbc-bgfx)
* [Go language API bindings](https://github.com/james4k/go-bgfx) * [Go language API bindings](https://github.com/james4k/go-bgfx)
* [Haskell language API bindings](https://github.com/haskell-game/bgfx) * [Haskell language API bindings](https://github.com/haskell-game/bgfx)
* [Lightweight Java Game Library 3 bindings](https://github.com/LWJGL/lwjgl3) * [Lightweight Java Game Library 3 bindings](https://github.com/LWJGL/lwjgl3)

79
bindings/d/fakeenum.d Normal file
View File

@ -0,0 +1,79 @@
/+
+ ==============================
+ AUTO GENERATED! DO NOT EDIT!
+ ==============================
+/
module bgfx.fakeenum;
//NOTE: Do NOT use this module! Use the enums with the same names in `bgfx/package.d` instead.
package:
extern(C++, "bgfx") package final abstract class Fatal{
enum Enum{
debugCheck,invalidShader,unableToInitialize,unableToCreateTexture,deviceLost,count
}
}
extern(C++, "bgfx") package final abstract class RendererType{
enum Enum{
noop,agc,direct3D9,direct3D11,direct3D12,gnm,metal,nvn,openGLES,openGL,vulkan,webGPU,count
}
}
extern(C++, "bgfx") package final abstract class Access{
enum Enum{
read,write,readWrite,count
}
}
extern(C++, "bgfx") package final abstract class Attrib{
enum Enum{
position,normal,tangent,bitangent,color0,color1,color2,color3,indices,weight,texCoord0,texCoord1,texCoord2,texCoord3,texCoord4,texCoord5,texCoord6,texCoord7,count
}
}
extern(C++, "bgfx") package final abstract class AttribType{
enum Enum{
uint8,uint10,int16,half,float_,count
}
}
extern(C++, "bgfx") package final abstract class TextureFormat{
enum Enum{
bc1,bc2,bc3,bc4,bc5,bc6h,bc7,etc1,etc2,etc2a,etc2a1,ptc12,ptc14,ptc12a,ptc14a,ptc22,ptc24,atc,atce,atci,astc4x4,astc5x4,astc5x5,astc6x5,astc6x6,astc8x5,astc8x6,astc8x8,astc10x5,astc10x6,astc10x8,astc10x10,astc12x10,astc12x12,unknown,r1,a8,r8,r8i,r8u,r8s,r16,r16i,r16u,r16f,r16s,r32i,r32u,r32f,rg8,rg8i,rg8u,rg8s,rg16,rg16i,rg16u,rg16f,rg16s,rg32i,rg32u,rg32f,rgb8,rgb8i,rgb8u,rgb8s,rgb9e5f,bgra8,rgba8,rgba8i,rgba8u,rgba8s,rgba16,rgba16i,rgba16u,rgba16f,rgba16s,rgba32i,rgba32u,rgba32f,b5g6r5,r5g6b5,bgra4,rgba4,bgr5a1,rgb5a1,rgb10a2,rg11b10f,unknownDepth,d16,d24,d24s8,d32,d16f,d24f,d32f,d0s8,count
}
}
extern(C++, "bgfx") package final abstract class UniformType{
enum Enum{
sampler,end,vec4,mat3,mat4,count
}
}
extern(C++, "bgfx") package final abstract class BackbufferRatio{
enum Enum{
equal,half,quarter,eighth,sixteenth,double_,count
}
}
extern(C++, "bgfx") package final abstract class OcclusionQueryResult{
enum Enum{
invisible,visible,noResult,count
}
}
extern(C++, "bgfx") package final abstract class Topology{
enum Enum{
triList,triStrip,lineList,lineStrip,pointList,count
}
}
extern(C++, "bgfx") package final abstract class TopologyConvert{
enum Enum{
triListFlipWinding,triStripFlipWinding,triListToLineList,triStripToTriList,lineStripToLineList,count
}
}
extern(C++, "bgfx") package final abstract class TopologySort{
enum Enum{
directionFrontToBackMin,directionFrontToBackAvg,directionFrontToBackMax,directionBackToFrontMin,directionBackToFrontAvg,directionBackToFrontMax,distanceFrontToBackMin,distanceFrontToBackAvg,distanceFrontToBackMax,distanceBackToFrontMin,distanceBackToFrontAvg,distanceBackToFrontMax,count
}
}
extern(C++, "bgfx") package final abstract class ViewMode{
enum Enum{
default_,sequential,depthAscending,depthDescending,count
}
}
extern(C++, "bgfx") package final abstract class RenderFrame{
enum Enum{
noContext,render,timeout,exiting,count
}
}

File diff suppressed because it is too large Load Diff

3608
bindings/d/package.d Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@ Supported Languages
- `C/C++ API documentation <https://bkaradzic.github.io/bgfx/bgfx.html>`__ - `C/C++ API documentation <https://bkaradzic.github.io/bgfx/bgfx.html>`__
- `Beef API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/bf>`__ - `Beef API bindings <https://github.com/bkaradzic/bgfx/tree/master/bindings/bf>`__
- `C# language API bindings #1 <https://github.com/bkaradzic/bgfx/tree/master/bindings/cs>`__ - `C# language API bindings #1 <https://github.com/bkaradzic/bgfx/tree/master/bindings/cs>`__
- `D language API bindings <https://github.com/GoaLitiuM/bindbc-bgfx>`__ - `D language API bindings <https://github.com/BindBC/bindbc-bgfx>`__
- `Go language API bindings <https://github.com/james4k/go-bgfx>`__ - `Go language API bindings <https://github.com/james4k/go-bgfx>`__
- `Haskell language API bindings <https://github.com/haskell-game/bgfx>`__ - `Haskell language API bindings <https://github.com/haskell-game/bgfx>`__
- `Lightweight Java Game Library 3 bindings <https://github.com/LWJGL/lwjgl3#lwjgl---lightweight-java-game-library-3>`__ - `Lightweight Java Game Library 3 bindings <https://github.com/LWJGL/lwjgl3#lwjgl---lightweight-java-game-library-3>`__

File diff suppressed because it is too large Load Diff

View File

@ -79,8 +79,8 @@ newaction {
csgen.write(csgen.gen_dllname(), "../bindings/cs/bgfx_dllname.cs") csgen.write(csgen.gen_dllname(), "../bindings/cs/bgfx_dllname.cs")
local dgen = require "bindings-d" local dgen = require "bindings-d"
dgen.write(dgen.gen_types(), "../bindings/d/types.d") dgen.write(dgen.gen(), "../bindings/d/package.d")
dgen.write(dgen.gen_funcs(), "../bindings/d/funcs.d") dgen.write(dgen.fakeEnumFile, "../bindings/d/fakeenum.d")
local csgen = require "bindings-bf" local csgen = require "bindings-bf"
csgen.write(csgen.gen(), "../bindings/bf/bgfx.bf") csgen.write(csgen.gen(), "../bindings/bf/bgfx.bf")