Last active
February 27, 2019 11:10
-
-
Save raizam/ac43a3cf4a6259b7e09ece3a1e82068e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using static LowSharp; | |
using System.Numerics; | |
namespace LibBgfx | |
{ | |
[Flags] | |
public enum ResetFlags : long | |
{ | |
None = 0x0,//UINT32_C ( 0x00000000 ) | |
Fullscreen = 0x1,//UINT32_C ( 0x00000001 ) | |
MsaaX2 = 0x10,//UINT32_C ( 0x00000010 ) | |
MsaaX4 = 0x20,//UINT32_C ( 0x00000020 ) | |
MsaaX8 = 0x30,//UINT32_C ( 0x00000030 ) | |
MsaaX16 = 0x40,//UINT32_C ( 0x00000040 ) | |
Vsync = 0x80,//UINT32_C ( 0x00000080 ) | |
Maxanisotropy = 0x100,//UINT32_C ( 0x00000100 ) | |
Capture = 0x200,//UINT32_C ( 0x00000200 ) | |
FlushAfterRender = 0x2000,//UINT32_C ( 0x00002000 ) | |
FlipAfterRender = 0x4000,//UINT32_C ( 0x00004000 ) | |
SrgbBackbuffer = 0x8000,//UINT32_C ( 0x00008000 ) | |
Hdr10 = 0x10000,//UINT32_C ( 0x00010000 ) | |
Hidpi = 0x20000,//UINT32_C ( 0x00020000 ) | |
DepthClamp = 0x40000,//UINT32_C ( 0x00040000 ) | |
Suspend = 0x80000,//UINT32_C ( 0x00080000 ) | |
InternalForce = 0x80000000,//UINT32_C ( 0x80000000 ) | |
} | |
[Flags] | |
public enum ClearFlags : uint | |
{ | |
None = 0x0,//UINT16_C ( 0x0000 ) | |
Color = 0x1,//UINT16_C ( 0x0001 ) | |
Depth = 0x2,//UINT16_C ( 0x0002 ) | |
Stencil = 0x4,//UINT16_C ( 0x0004 ) | |
DiscardColor0 = 0x8,//UINT16_C ( 0x0008 ) | |
DiscardColor1 = 0x10,//UINT16_C ( 0x0010 ) | |
DiscardColor2 = 0x20,//UINT16_C ( 0x0020 ) | |
DiscardColor3 = 0x40,//UINT16_C ( 0x0040 ) | |
DiscardColor4 = 0x80,//UINT16_C ( 0x0080 ) | |
DiscardColor5 = 0x100,//UINT16_C ( 0x0100 ) | |
DiscardColor6 = 0x200,//UINT16_C ( 0x0200 ) | |
DiscardColor7 = 0x400,//UINT16_C ( 0x0400 ) | |
DiscardDepth = 0x800,//UINT16_C ( 0x0800 ) | |
DiscardStencil = 0x1000,//UINT16_C ( 0x1000 ) | |
ColorUsePalette = 0x8000,//UINT16_C ( 0x8000 ) | |
} | |
[Flags] | |
public enum TextureFlags : ulong | |
{ | |
None = 0x0,//UINT64_C ( 0x0000000000000000 ) | |
MsaaSample = 0x800000000,//UINT64_C ( 0x0000000800000000 ) | |
Rt = 0x1000000000,//UINT64_C ( 0x0000001000000000 ) | |
RtMsaaX2 = 0x2000000000,//UINT64_C ( 0x0000002000000000 ) | |
RtMsaaX4 = 0x3000000000,//UINT64_C ( 0x0000003000000000 ) | |
RtMsaaX8 = 0x4000000000,//UINT64_C ( 0x0000004000000000 ) | |
RtMsaaX16 = 0x5000000000,//UINT64_C ( 0x0000005000000000 ) | |
RtWriteOnly = 0x8000000000,//UINT64_C ( 0x0000008000000000 ) | |
ComputeWrite = 0x100000000000,//UINT64_C ( 0x0000100000000000 ) | |
Srgb = 0x200000000000,//UINT64_C ( 0x0000200000000000 ) | |
BlitDst = 0x400000000000,//UINT64_C ( 0x0000400000000000 ) | |
ReadBack = 0x800000000000,//UINT64_C ( 0x0000800000000000 ) | |
} | |
[Flags] | |
public enum DebugFlags : uint | |
{ | |
None = 0x0,//UINT32_C ( 0x00000000 ) | |
Wireframe = 0x1,//UINT32_C ( 0x00000001 ) | |
Ifh = 0x2,//UINT32_C ( 0x00000002 ) | |
Stats = 0x4,//UINT32_C ( 0x00000004 ) | |
Text = 0x8,//UINT32_C ( 0x00000008 ) | |
Profiler = 0x10,//UINT32_C ( 0x00000010 ) | |
} | |
[Flags] | |
public enum StateFlags : ulong | |
{ | |
WriteR = 0x1,//UINT64_C ( 0x0000000000000001 ) | |
WriteG = 0x2,//UINT64_C ( 0x0000000000000002 ) | |
WriteB = 0x4,//UINT64_C ( 0x0000000000000004 ) | |
WriteA = 0x8,//UINT64_C ( 0x0000000000000008 ) | |
WriteZ = 0x4000000000,//UINT64_C ( 0x0000004000000000 ) | |
WriteRgb = ( 0x0 | WriteR | WriteG | WriteB ),//( 0 | BGFX_STATE_WRITE_R | BGFX_STATE_WRITE_G | BGFX_STATE_WRITE_B ) | |
DepthTestLess = 0x10,//UINT64_C ( 0x0000000000000010 ) | |
DepthTestLequal = 0x20,//UINT64_C ( 0x0000000000000020 ) | |
DepthTestEqual = 0x30,//UINT64_C ( 0x0000000000000030 ) | |
DepthTestGequal = 0x40,//UINT64_C ( 0x0000000000000040 ) | |
DepthTestGreater = 0x50,//UINT64_C ( 0x0000000000000050 ) | |
DepthTestNotequal = 0x60,//UINT64_C ( 0x0000000000000060 ) | |
DepthTestNever = 0x70,//UINT64_C ( 0x0000000000000070 ) | |
DepthTestAlways = 0x80,//UINT64_C ( 0x0000000000000080 ) | |
BlendZero = 0x1000,//UINT64_C ( 0x0000000000001000 ) | |
BlendOne = 0x2000,//UINT64_C ( 0x0000000000002000 ) | |
BlendSrcColor = 0x3000,//UINT64_C ( 0x0000000000003000 ) | |
BlendInvSrcColor = 0x4000,//UINT64_C ( 0x0000000000004000 ) | |
BlendSrcAlpha = 0x5000,//UINT64_C ( 0x0000000000005000 ) | |
BlendInvSrcAlpha = 0x6000,//UINT64_C ( 0x0000000000006000 ) | |
BlendDstAlpha = 0x7000,//UINT64_C ( 0x0000000000007000 ) | |
BlendInvDstAlpha = 0x8000,//UINT64_C ( 0x0000000000008000 ) | |
BlendDstColor = 0x9000,//UINT64_C ( 0x0000000000009000 ) | |
BlendInvDstColor = 0xA000,//UINT64_C ( 0x000000000000a000 ) | |
BlendSrcAlphaSat = 0xB000,//UINT64_C ( 0x000000000000b000 ) | |
BlendFactor = 0xC000,//UINT64_C ( 0x000000000000c000 ) | |
BlendInvFactor = 0xD000,//UINT64_C ( 0x000000000000d000 ) | |
BlendEquationAdd = 0x0,//UINT64_C ( 0x0000000000000000 ) | |
BlendEquationSub = 0x10000000,//UINT64_C ( 0x0000000010000000 ) | |
BlendEquationRevsub = 0x20000000,//UINT64_C ( 0x0000000020000000 ) | |
BlendEquationMin = 0x30000000,//UINT64_C ( 0x0000000030000000 ) | |
BlendEquationMax = 0x40000000,//UINT64_C ( 0x0000000040000000 ) | |
BlendIndependent = 0x400000000,//UINT64_C ( 0x0000000400000000 ) | |
BlendAlphaToCoverage = 0x800000000,//UINT64_C ( 0x0000000800000000 ) | |
CullCw = 0x1000000000,//UINT64_C ( 0x0000001000000000 ) | |
CullCcw = 0x2000000000,//UINT64_C ( 0x0000002000000000 ) | |
PtTristrip = 0x1000000000000,//UINT64_C ( 0x0001000000000000 ) | |
PtLines = 0x2000000000000,//UINT64_C ( 0x0002000000000000 ) | |
PtLinestrip = 0x3000000000000,//UINT64_C ( 0x0003000000000000 ) | |
PtPoints = 0x4000000000000,//UINT64_C ( 0x0004000000000000 ) | |
Msaa = 0x100000000000000,//UINT64_C ( 0x0100000000000000 ) | |
Lineaa = 0x200000000000000,//UINT64_C ( 0x0200000000000000 ) | |
ConservativeRaster = 0x400000000000000,//UINT64_C ( 0x0400000000000000 ) | |
None = 0x0,//UINT64_C ( 0x0000000000000000 ) | |
Default = ( 0x0 | WriteRgb | WriteA | WriteZ | DepthTestLess | CullCw | Msaa ),//( 0 | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A | BGFX_STATE_WRITE_Z | BGFX_STATE_DEPTH_TEST_LESS | BGFX_STATE_CULL_CW | BGFX_STATE_MSAA ) | |
BlendAdd = ( 0x0 | ( 0x0 | ( ( BlendOne | ( BlendOne << 0x4 ) ) ) | ( ( BlendOne | ( BlendOne << 0x4 ) ) << 0x8 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_ONE , BGFX_STATE_BLEND_ONE ) ) | |
BlendAlpha = ( 0x0 | ( 0x0 | ( ( BlendSrcAlpha | ( BlendInvSrcAlpha << 0x4 ) ) ) | ( ( BlendSrcAlpha | ( BlendInvSrcAlpha << 0x4 ) ) << 0x8 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_SRC_ALPHA , BGFX_STATE_BLEND_INV_SRC_ALPHA ) ) | |
BlendDarken = ( 0x0 | ( 0x0 | ( ( BlendOne | ( BlendOne << 0x4 ) ) ) | ( ( BlendOne | ( BlendOne << 0x4 ) ) << 0x8 ) ) | ( BlendEquationMin | ( BlendEquationMin << 0x3 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_ONE , BGFX_STATE_BLEND_ONE ) | BGFX_STATE_BLEND_EQUATION ( BGFX_STATE_BLEND_EQUATION_MIN ) ) | |
BlendLighten = ( 0x0 | ( 0x0 | ( ( BlendOne | ( BlendOne << 0x4 ) ) ) | ( ( BlendOne | ( BlendOne << 0x4 ) ) << 0x8 ) ) | ( BlendEquationMax | ( BlendEquationMax << 0x3 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_ONE , BGFX_STATE_BLEND_ONE ) | BGFX_STATE_BLEND_EQUATION ( BGFX_STATE_BLEND_EQUATION_MAX ) ) | |
BlendMultiply = ( 0x0 | ( 0x0 | ( ( BlendDstColor | ( BlendZero << 0x4 ) ) ) | ( ( BlendDstColor | ( BlendZero << 0x4 ) ) << 0x8 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_DST_COLOR , BGFX_STATE_BLEND_ZERO ) ) | |
BlendNormal = ( 0x0 | ( 0x0 | ( ( BlendOne | ( BlendInvSrcAlpha << 0x4 ) ) ) | ( ( BlendOne | ( BlendInvSrcAlpha << 0x4 ) ) << 0x8 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_ONE , BGFX_STATE_BLEND_INV_SRC_ALPHA ) ) | |
BlendScreen = ( 0x0 | ( 0x0 | ( ( BlendOne | ( BlendInvSrcColor << 0x4 ) ) ) | ( ( BlendOne | ( BlendInvSrcColor << 0x4 ) ) << 0x8 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_ONE , BGFX_STATE_BLEND_INV_SRC_COLOR ) ) | |
BlendLinearBurn = ( 0x0 | ( 0x0 | ( ( BlendDstColor | ( BlendInvDstColor << 0x4 ) ) ) | ( ( BlendDstColor | ( BlendInvDstColor << 0x4 ) ) << 0x8 ) ) | ( BlendEquationSub | ( BlendEquationSub << 0x3 ) ) ),//( 0 | BGFX_STATE_BLEND_FUNC ( BGFX_STATE_BLEND_DST_COLOR , BGFX_STATE_BLEND_INV_DST_COLOR ) | BGFX_STATE_BLEND_EQUATION ( BGFX_STATE_BLEND_EQUATION_SUB ) ) | |
InternalScissor = 0x2000000000000000,//UINT64_C ( 0x2000000000000000 ) | |
InternalOcclusionQuery = 0x4000000000000000,//UINT64_C ( 0x4000000000000000 ) | |
} | |
[Flags] | |
public enum StencilFlags : uint | |
{ | |
TestLess = 0x10000,//UINT32_C ( 0x00010000 ) | |
TestLequal = 0x20000,//UINT32_C ( 0x00020000 ) | |
TestEqual = 0x30000,//UINT32_C ( 0x00030000 ) | |
TestGequal = 0x40000,//UINT32_C ( 0x00040000 ) | |
TestGreater = 0x50000,//UINT32_C ( 0x00050000 ) | |
TestNotequal = 0x60000,//UINT32_C ( 0x00060000 ) | |
TestNever = 0x70000,//UINT32_C ( 0x00070000 ) | |
TestAlways = 0x80000,//UINT32_C ( 0x00080000 ) | |
OpFailSZero = 0x0,//UINT32_C ( 0x00000000 ) | |
OpFailSKeep = 0x100000,//UINT32_C ( 0x00100000 ) | |
OpFailSReplace = 0x200000,//UINT32_C ( 0x00200000 ) | |
OpFailSIncr = 0x300000,//UINT32_C ( 0x00300000 ) | |
OpFailSIncrsat = 0x400000,//UINT32_C ( 0x00400000 ) | |
OpFailSDecr = 0x500000,//UINT32_C ( 0x00500000 ) | |
OpFailSDecrsat = 0x600000,//UINT32_C ( 0x00600000 ) | |
OpFailSInvert = 0x700000,//UINT32_C ( 0x00700000 ) | |
OpFailZZero = 0x0,//UINT32_C ( 0x00000000 ) | |
OpFailZKeep = 0x1000000,//UINT32_C ( 0x01000000 ) | |
OpFailZReplace = 0x2000000,//UINT32_C ( 0x02000000 ) | |
OpFailZIncr = 0x3000000,//UINT32_C ( 0x03000000 ) | |
OpFailZIncrsat = 0x4000000,//UINT32_C ( 0x04000000 ) | |
OpFailZDecr = 0x5000000,//UINT32_C ( 0x05000000 ) | |
OpFailZDecrsat = 0x6000000,//UINT32_C ( 0x06000000 ) | |
OpFailZInvert = 0x7000000,//UINT32_C ( 0x07000000 ) | |
OpPassZZero = 0x0,//UINT32_C ( 0x00000000 ) | |
OpPassZKeep = 0x10000000,//UINT32_C ( 0x10000000 ) | |
OpPassZReplace = 0x20000000,//UINT32_C ( 0x20000000 ) | |
OpPassZIncr = 0x30000000,//UINT32_C ( 0x30000000 ) | |
OpPassZIncrsat = 0x40000000,//UINT32_C ( 0x40000000 ) | |
OpPassZDecr = 0x50000000,//UINT32_C ( 0x50000000 ) | |
OpPassZDecrsat = 0x60000000,//UINT32_C ( 0x60000000 ) | |
OpPassZInvert = 0x70000000,//UINT32_C ( 0x70000000 ) | |
None = 0x0,//UINT32_C ( 0x00000000 ) | |
Default = 0x0,//UINT32_C ( 0x00000000 ) | |
} | |
[Flags] | |
public enum SamplerFlags : uint | |
{ | |
None = 0x0,//UINT32_C ( 0x00000000 ) | |
UMirror = 0x1,//UINT32_C ( 0x00000001 ) | |
UClamp = 0x2,//UINT32_C ( 0x00000002 ) | |
UBorder = 0x3,//UINT32_C ( 0x00000003 ) | |
VMirror = 0x4,//UINT32_C ( 0x00000004 ) | |
VClamp = 0x8,//UINT32_C ( 0x00000008 ) | |
VBorder = 0xC,//UINT32_C ( 0x0000000c ) | |
WMirror = 0x10,//UINT32_C ( 0x00000010 ) | |
WClamp = 0x20,//UINT32_C ( 0x00000020 ) | |
WBorder = 0x30,//UINT32_C ( 0x00000030 ) | |
MinPoint = 0x40,//UINT32_C ( 0x00000040 ) | |
MinAnisotropic = 0x80,//UINT32_C ( 0x00000080 ) | |
MagPoint = 0x100,//UINT32_C ( 0x00000100 ) | |
MagAnisotropic = 0x200,//UINT32_C ( 0x00000200 ) | |
MipPoint = 0x400,//UINT32_C ( 0x00000400 ) | |
CompareLess = 0x10000,//UINT32_C ( 0x00010000 ) | |
CompareLequal = 0x20000,//UINT32_C ( 0x00020000 ) | |
CompareEqual = 0x30000,//UINT32_C ( 0x00030000 ) | |
CompareGequal = 0x40000,//UINT32_C ( 0x00040000 ) | |
CompareGreater = 0x50000,//UINT32_C ( 0x00050000 ) | |
CompareNotequal = 0x60000,//UINT32_C ( 0x00060000 ) | |
CompareNever = 0x70000,//UINT32_C ( 0x00070000 ) | |
CompareAlways = 0x80000,//UINT32_C ( 0x00080000 ) | |
SampleStencil = 0x100000,//UINT32_C ( 0x00100000 ) | |
Point = ( 0x0 | MinPoint | MagPoint | MipPoint ),//( 0 | BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_MIP_POINT ) | |
UvwMirror = ( 0x0 | UMirror | VMirror | WMirror ),//( 0 | BGFX_SAMPLER_U_MIRROR | BGFX_SAMPLER_V_MIRROR | BGFX_SAMPLER_W_MIRROR ) | |
UvwClamp = ( 0x0 | UClamp | VClamp | WClamp ),//( 0 | BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP | BGFX_SAMPLER_W_CLAMP ) | |
UvwBorder = ( 0x0 | UBorder | VBorder | WBorder ),//( 0 | BGFX_SAMPLER_U_BORDER | BGFX_SAMPLER_V_BORDER | BGFX_SAMPLER_W_BORDER ) | |
InternalDefault = 0x10000000,//UINT32_C ( 0x10000000 ) | |
InternalShared = 0x20000000,//UINT32_C ( 0x20000000 ) | |
} | |
[Flags] | |
public enum BufferFlags : ushort | |
{ | |
None = 0x0,//UINT16_C ( 0x0000 ) | |
ComputeFormat8x1 = 0x1,//UINT16_C ( 0x0001 ) | |
ComputeFormat8x2 = 0x2,//UINT16_C ( 0x0002 ) | |
ComputeFormat8x4 = 0x3,//UINT16_C ( 0x0003 ) | |
ComputeFormat16x1 = 0x4,//UINT16_C ( 0x0004 ) | |
ComputeFormat16x2 = 0x5,//UINT16_C ( 0x0005 ) | |
ComputeFormat16x4 = 0x6,//UINT16_C ( 0x0006 ) | |
ComputeFormat32x1 = 0x7,//UINT16_C ( 0x0007 ) | |
ComputeFormat32x2 = 0x8,//UINT16_C ( 0x0008 ) | |
ComputeFormat32x4 = 0x9,//UINT16_C ( 0x0009 ) | |
ComputeTypeInt = 0x10,//UINT16_C ( 0x0010 ) | |
ComputeTypeUint = 0x20,//UINT16_C ( 0x0020 ) | |
ComputeTypeFloat = 0x30,//UINT16_C ( 0x0030 ) | |
ComputeRead = 0x100,//UINT16_C ( 0x0100 ) | |
ComputeWrite = 0x200,//UINT16_C ( 0x0200 ) | |
DrawIndirect = 0x400,//UINT16_C ( 0x0400 ) | |
AllowResize = 0x800,//UINT16_C ( 0x0800 ) | |
Index32 = 0x1000,//UINT16_C ( 0x1000 ) | |
ComputeReadWrite = ( 0x0 | ComputeRead | ComputeWrite ),//( 0 | BGFX_BUFFER_COMPUTE_READ | BGFX_BUFFER_COMPUTE_WRITE ) | |
} | |
public unsafe partial struct AllocatorInterface : IDisposable | |
{ | |
//bgfx_allocator_interface_t | |
private AllocatorInterface(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static AllocatorInterface New(in Data val = default) => new AllocatorInterface(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public AllocatorInterface AsPtr() { fixed(Data* ptr = &this) return new AllocatorInterface(ptr); } | |
public AllocatorVtbl Vtbl; | |
} | |
public AllocatorVtbl Vtbl => ptr->Vtbl; | |
public void SetVtbl(AllocatorVtbl value) => ptr->Vtbl = value; | |
} | |
public unsafe partial struct AllocatorVtbl : IDisposable | |
{ | |
//bgfx_allocator_vtbl_s | |
private AllocatorVtbl(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static AllocatorVtbl New(in Data val = default) => new AllocatorVtbl(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public AllocatorVtbl AsPtr() { fixed(Data* ptr = &this) return new AllocatorVtbl(ptr); } | |
public IntPtr _Realloc; | |
public void SetRealloc(ReallocDelegate value) => _Realloc = Marshal.GetFunctionPointerForDelegate(value); | |
} | |
public ReallocDelegate Realloc => Marshal.GetDelegateForFunctionPointer<ReallocDelegate>(ptr->_Realloc); | |
public void SetRealloc(ReallocDelegate value) => ptr->_Realloc = Marshal.GetFunctionPointerForDelegate(value); | |
} | |
public unsafe partial struct Attachment : IDisposable | |
{ | |
//bgfx_attachment_t | |
private Attachment(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static Attachment New(in Data val = default) => new Attachment(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public Attachment AsPtr() { fixed(Data* ptr = &this) return new Attachment(ptr); } | |
public BufferAccess Access; | |
public Texture Handle; | |
public ushort Mip; | |
public ushort Layer; | |
public byte Resolve; | |
} | |
public BufferAccess Access => ptr->Access; | |
public void SetAccess(BufferAccess value) => ptr->Access = value; | |
public Texture Handle => ptr->Handle; | |
public void SetHandle(Texture value) => ptr->Handle = value; | |
public ushort Mip => ptr->Mip; | |
public void SetMip(ushort value) => ptr->Mip = value; | |
public ushort Layer => ptr->Layer; | |
public void SetLayer(ushort value) => ptr->Layer = value; | |
public byte Resolve => ptr->Resolve; | |
public void SetResolve(byte value) => ptr->Resolve = value; | |
} | |
public unsafe partial struct BgfxInit : IDisposable | |
{ | |
//bgfx_init_t | |
private BgfxInit(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static BgfxInit New(in Data val = default) => new BgfxInit(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public BgfxInit AsPtr() { fixed(Data* ptr = &this) return new BgfxInit(ptr); } | |
public RendererType Type; | |
public ushort VendorId; | |
public ushort DeviceId; | |
public bool Debug; | |
public bool Profile; | |
public PlatformData PlatformData; | |
public Resolution Resolution; | |
public InitLimits Limits; | |
public CallbackInterface Callback; | |
public AllocatorInterface Allocator; | |
} | |
public RendererType Type => ptr->Type; | |
public void SetType(RendererType value) => ptr->Type = value; | |
public ushort VendorId => ptr->VendorId; | |
public void SetVendorId(ushort value) => ptr->VendorId = value; | |
public ushort DeviceId => ptr->DeviceId; | |
public void SetDeviceId(ushort value) => ptr->DeviceId = value; | |
public bool Debug => ptr->Debug; | |
public void SetDebug(bool value) => ptr->Debug = value; | |
public bool Profile => ptr->Profile; | |
public void SetProfile(bool value) => ptr->Profile = value; | |
public PlatformData PlatformData => ptr->PlatformData; | |
public void SetPlatformData(PlatformData value) => ptr->PlatformData = value; | |
public Resolution Resolution => ptr->Resolution; | |
public void SetResolution(Resolution value) => ptr->Resolution = value; | |
public InitLimits Limits => ptr->Limits; | |
public void SetLimits(InitLimits value) => ptr->Limits = value; | |
public CallbackInterface Callback => ptr->Callback; | |
public void SetCallback(CallbackInterface value) => ptr->Callback = value; | |
public AllocatorInterface Allocator => ptr->Allocator; | |
public void SetAllocator(AllocatorInterface value) => ptr->Allocator = value; | |
} | |
public unsafe partial struct CallbackInterface : IDisposable | |
{ | |
//bgfx_callback_interface_t | |
private CallbackInterface(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static CallbackInterface New(in Data val = default) => new CallbackInterface(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public CallbackInterface AsPtr() { fixed(Data* ptr = &this) return new CallbackInterface(ptr); } | |
public CallbackVtbl Vtbl; | |
} | |
public CallbackVtbl Vtbl => ptr->Vtbl; | |
public void SetVtbl(CallbackVtbl value) => ptr->Vtbl = value; | |
} | |
public unsafe partial struct CallbackVtbl : IDisposable | |
{ | |
//bgfx_callback_vtbl_s | |
private CallbackVtbl(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static CallbackVtbl New(in Data val = default) => new CallbackVtbl(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public CallbackVtbl AsPtr() { fixed(Data* ptr = &this) return new CallbackVtbl(ptr); } | |
public IntPtr _Fatal; | |
public void SetFatal(FatalDelegate value) => _Fatal = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _TraceVargs; | |
public void SetTraceVargs(TraceVargsDelegate value) => _TraceVargs = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _ProfilerBegin; | |
public void SetProfilerBegin(ProfilerBeginDelegate value) => _ProfilerBegin = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _ProfilerBeginLiteral; | |
public void SetProfilerBeginLiteral(ProfilerBeginDelegate value) => _ProfilerBeginLiteral = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _ProfilerEnd; | |
public void SetProfilerEnd(ProfilerEndDelegate value) => _ProfilerEnd = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CacheReadSize; | |
public void SetCacheReadSize(CacheReadSizeDelegate value) => _CacheReadSize = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CacheRead; | |
public void SetCacheRead(CacheReadDelegate value) => _CacheRead = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CacheWrite; | |
public void SetCacheWrite(CacheWriteDelegate value) => _CacheWrite = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _ScreenShot; | |
public void SetScreenShot(ScreenShotDelegate value) => _ScreenShot = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CaptureBegin; | |
public void SetCaptureBegin(CaptureBeginDelegate value) => _CaptureBegin = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CaptureEnd; | |
public void SetCaptureEnd(ProfilerEndDelegate value) => _CaptureEnd = Marshal.GetFunctionPointerForDelegate(value); | |
public IntPtr _CaptureFrame; | |
public void SetCaptureFrame(CaptureFrameDelegate value) => _CaptureFrame = Marshal.GetFunctionPointerForDelegate(value); | |
} | |
public FatalDelegate Fatal => Marshal.GetDelegateForFunctionPointer<FatalDelegate>(ptr->_Fatal); | |
public void SetFatal(FatalDelegate value) => ptr->_Fatal = Marshal.GetFunctionPointerForDelegate(value); | |
public TraceVargsDelegate TraceVargs => Marshal.GetDelegateForFunctionPointer<TraceVargsDelegate>(ptr->_TraceVargs); | |
public void SetTraceVargs(TraceVargsDelegate value) => ptr->_TraceVargs = Marshal.GetFunctionPointerForDelegate(value); | |
public ProfilerBeginDelegate ProfilerBegin => Marshal.GetDelegateForFunctionPointer<ProfilerBeginDelegate>(ptr->_ProfilerBegin); | |
public void SetProfilerBegin(ProfilerBeginDelegate value) => ptr->_ProfilerBegin = Marshal.GetFunctionPointerForDelegate(value); | |
public ProfilerBeginDelegate ProfilerBeginLiteral => Marshal.GetDelegateForFunctionPointer<ProfilerBeginDelegate>(ptr->_ProfilerBeginLiteral); | |
public void SetProfilerBeginLiteral(ProfilerBeginDelegate value) => ptr->_ProfilerBeginLiteral = Marshal.GetFunctionPointerForDelegate(value); | |
public ProfilerEndDelegate ProfilerEnd => Marshal.GetDelegateForFunctionPointer<ProfilerEndDelegate>(ptr->_ProfilerEnd); | |
public void SetProfilerEnd(ProfilerEndDelegate value) => ptr->_ProfilerEnd = Marshal.GetFunctionPointerForDelegate(value); | |
public CacheReadSizeDelegate CacheReadSize => Marshal.GetDelegateForFunctionPointer<CacheReadSizeDelegate>(ptr->_CacheReadSize); | |
public void SetCacheReadSize(CacheReadSizeDelegate value) => ptr->_CacheReadSize = Marshal.GetFunctionPointerForDelegate(value); | |
public CacheReadDelegate CacheRead => Marshal.GetDelegateForFunctionPointer<CacheReadDelegate>(ptr->_CacheRead); | |
public void SetCacheRead(CacheReadDelegate value) => ptr->_CacheRead = Marshal.GetFunctionPointerForDelegate(value); | |
public CacheWriteDelegate CacheWrite => Marshal.GetDelegateForFunctionPointer<CacheWriteDelegate>(ptr->_CacheWrite); | |
public void SetCacheWrite(CacheWriteDelegate value) => ptr->_CacheWrite = Marshal.GetFunctionPointerForDelegate(value); | |
public ScreenShotDelegate ScreenShot => Marshal.GetDelegateForFunctionPointer<ScreenShotDelegate>(ptr->_ScreenShot); | |
public void SetScreenShot(ScreenShotDelegate value) => ptr->_ScreenShot = Marshal.GetFunctionPointerForDelegate(value); | |
public CaptureBeginDelegate CaptureBegin => Marshal.GetDelegateForFunctionPointer<CaptureBeginDelegate>(ptr->_CaptureBegin); | |
public void SetCaptureBegin(CaptureBeginDelegate value) => ptr->_CaptureBegin = Marshal.GetFunctionPointerForDelegate(value); | |
public ProfilerEndDelegate CaptureEnd => Marshal.GetDelegateForFunctionPointer<ProfilerEndDelegate>(ptr->_CaptureEnd); | |
public void SetCaptureEnd(ProfilerEndDelegate value) => ptr->_CaptureEnd = Marshal.GetFunctionPointerForDelegate(value); | |
public CaptureFrameDelegate CaptureFrame => Marshal.GetDelegateForFunctionPointer<CaptureFrameDelegate>(ptr->_CaptureFrame); | |
public void SetCaptureFrame(CaptureFrameDelegate value) => ptr->_CaptureFrame = Marshal.GetFunctionPointerForDelegate(value); | |
} | |
public unsafe partial struct Capabilities : IDisposable | |
{ | |
//bgfx_caps_t | |
private Capabilities(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static Capabilities New(in Data val = default) => new Capabilities(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public Capabilities AsPtr() { fixed(Data* ptr = &this) return new Capabilities(ptr); } | |
public RendererType RendererType; | |
public ulong Supported; | |
public ushort VendorId; | |
public ushort DeviceId; | |
public bool HomogeneousDepth; | |
public bool OriginBottomLeft; | |
public byte NumGPUs; | |
public GPUCapabilities Gpu; | |
public CapsLimits Limits; | |
public fixed ushort Formats[85]; | |
} | |
public RendererType RendererType => ptr->RendererType; | |
public void SetRendererType(RendererType value) => ptr->RendererType = value; | |
public ulong Supported => ptr->Supported; | |
public void SetSupported(ulong value) => ptr->Supported = value; | |
public ushort VendorId => ptr->VendorId; | |
public void SetVendorId(ushort value) => ptr->VendorId = value; | |
public ushort DeviceId => ptr->DeviceId; | |
public void SetDeviceId(ushort value) => ptr->DeviceId = value; | |
public bool HomogeneousDepth => ptr->HomogeneousDepth; | |
public void SetHomogeneousDepth(bool value) => ptr->HomogeneousDepth = value; | |
public bool OriginBottomLeft => ptr->OriginBottomLeft; | |
public void SetOriginBottomLeft(bool value) => ptr->OriginBottomLeft = value; | |
public byte NumGPUs => ptr->NumGPUs; | |
public void SetNumGPUs(byte value) => ptr->NumGPUs = value; | |
public GPUCapabilities Gpu => ptr->Gpu; | |
public CapsLimits Limits => ptr->Limits; | |
public void SetLimits(CapsLimits value) => ptr->Limits = value; | |
} | |
public unsafe partial struct CapsLimits | |
{ | |
//bgfx_caps_limits_t | |
public uint MaxDrawCalls; | |
public uint MaxBlits; | |
public uint MaxTextureSize; | |
public uint MaxTextureLayers; | |
public uint MaxViews; | |
public uint MaxFrameBuffers; | |
public uint MaxFBAttachments; | |
public uint MaxPrograms; | |
public uint MaxShaders; | |
public uint MaxTextures; | |
public uint MaxTextureSamplers; | |
public uint MaxComputeBindings; | |
public uint MaxVertexDecls; | |
public uint MaxVertexStreams; | |
public uint MaxIndexBuffers; | |
public uint MaxVertexBuffers; | |
public uint MaxDynamicIndexBuffers; | |
public uint MaxDynamicVertexBuffers; | |
public uint MaxUniforms; | |
public uint MaxOcclusionQueries; | |
public uint MaxEncoders; | |
public uint TransientVbSize; | |
public uint TransientIbSize; | |
} | |
public unsafe partial struct DynamicIndexBuffer | |
{ | |
//bgfx_dynamic_index_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct DynamicVertexBuffer | |
{ | |
//bgfx_dynamic_vertex_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct EncoderStats : IDisposable | |
{ | |
//bgfx_encoder_stats_t | |
private EncoderStats(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static EncoderStats New(in Data val = default) => new EncoderStats(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public EncoderStats AsPtr() { fixed(Data* ptr = &this) return new EncoderStats(ptr); } | |
public long CpuTimeBegin; | |
public long CpuTimeEnd; | |
} | |
public long CpuTimeBegin => ptr->CpuTimeBegin; | |
public void SetCpuTimeBegin(long value) => ptr->CpuTimeBegin = value; | |
public long CpuTimeEnd => ptr->CpuTimeEnd; | |
public void SetCpuTimeEnd(long value) => ptr->CpuTimeEnd = value; | |
} | |
public unsafe partial struct FrameBuffer | |
{ | |
//bgfx_frame_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct GPUInfo | |
{ | |
//bgfx_caps_gpu_t | |
public ushort VendorId; | |
public ushort DeviceId; | |
} | |
public unsafe partial struct IndexBuffer | |
{ | |
//bgfx_index_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct IndirectBuffer | |
{ | |
//bgfx_indirect_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct InitLimits | |
{ | |
//bgfx_init_limits_t | |
public ushort MaxEncoders; | |
public uint TransientVbSize; | |
public uint TransientIbSize; | |
} | |
public unsafe partial struct InstanceDataBuffer : IDisposable | |
{ | |
//bgfx_instance_data_buffer_t | |
private InstanceDataBuffer(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static InstanceDataBuffer New(in Data val = default) => new InstanceDataBuffer(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public InstanceDataBuffer AsPtr() { fixed(Data* ptr = &this) return new InstanceDataBuffer(ptr); } | |
public byte* data; | |
public uint Size; | |
public uint Offset; | |
public uint Num; | |
public ushort Stride; | |
public VertexBuffer Handle; | |
} | |
public byte* data => ptr->data; | |
public void SetData(byte* value) => ptr->data = value; | |
public uint Size => ptr->Size; | |
public void SetSize(uint value) => ptr->Size = value; | |
public uint Offset => ptr->Offset; | |
public void SetOffset(uint value) => ptr->Offset = value; | |
public uint Num => ptr->Num; | |
public void SetNum(uint value) => ptr->Num = value; | |
public ushort Stride => ptr->Stride; | |
public void SetStride(ushort value) => ptr->Stride = value; | |
public VertexBuffer Handle => ptr->Handle; | |
public void SetHandle(VertexBuffer value) => ptr->Handle = value; | |
} | |
public unsafe partial struct InternalData : IDisposable | |
{ | |
//bgfx_internal_data_t | |
private InternalData(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static InternalData New(in Data val = default) => new InternalData(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public InternalData AsPtr() { fixed(Data* ptr = &this) return new InternalData(ptr); } | |
public Caps Caps; | |
public IntPtr Context; | |
} | |
public Caps Caps => ptr->Caps; | |
public void SetCaps(Caps value) => ptr->Caps = value; | |
public IntPtr Context => ptr->Context; | |
public void SetContext(IntPtr value) => ptr->Context = value; | |
} | |
public unsafe partial struct Memory : IDisposable | |
{ | |
//bgfx_memory_t | |
private Memory(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static Memory New(in Data val = default) => new Memory(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public Memory AsPtr() { fixed(Data* ptr = &this) return new Memory(ptr); } | |
public byte* data; | |
public uint Size; | |
} | |
public byte* data => ptr->data; | |
public void SetData(byte* value) => ptr->data = value; | |
public uint Size => ptr->Size; | |
public void SetSize(uint value) => ptr->Size = value; | |
} | |
public unsafe partial struct OcclusionQuery | |
{ | |
//bgfx_occlusion_query_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct PlatformData | |
{ | |
//bgfx_platform_data_t | |
public IntPtr Ndt; | |
public IntPtr Nwh; | |
public IntPtr Context; | |
public IntPtr BackBuffer; | |
public IntPtr BackBufferDS; | |
} | |
public unsafe partial struct Resolution | |
{ | |
//bgfx_resolution_t | |
public TextureFormat Format; | |
public uint Width; | |
public uint Height; | |
public uint Reset; | |
public byte NumBackBuffers; | |
public byte MaxFrameLatency; | |
} | |
public unsafe partial struct Shader | |
{ | |
//bgfx_shader_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct ShaderProgram | |
{ | |
//bgfx_program_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct Stats : IDisposable | |
{ | |
//bgfx_stats_t | |
private Stats(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static Stats New(in Data val = default) => new Stats(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public Stats AsPtr() { fixed(Data* ptr = &this) return new Stats(ptr); } | |
public long CpuTimeFrame; | |
public long CpuTimeBegin; | |
public long CpuTimeEnd; | |
public long CpuTimerFreq; | |
public long GpuTimeBegin; | |
public long GpuTimeEnd; | |
public long GpuTimerFreq; | |
public long WaitRender; | |
public long WaitSubmit; | |
public uint NumDraw; | |
public uint NumCompute; | |
public uint NumBlit; | |
public uint MaxGpuLatency; | |
public ushort NumDynamicIndexBuffers; | |
public ushort NumDynamicVertexBuffers; | |
public ushort NumFrameBuffers; | |
public ushort NumIndexBuffers; | |
public ushort NumOcclusionQueries; | |
public ushort NumPrograms; | |
public ushort NumShaders; | |
public ushort NumTextures; | |
public ushort NumUniforms; | |
public ushort NumVertexBuffers; | |
public ushort NumVertexDecls; | |
public long TextureMemoryUsed; | |
public long RtMemoryUsed; | |
public int TransientVbUsed; | |
public int TransientIbUsed; | |
public fixed uint NumPrims[5]; | |
public long GpuMemoryMax; | |
public long GpuMemoryUsed; | |
public ushort Width; | |
public ushort Height; | |
public ushort TextWidth; | |
public ushort TextHeight; | |
public ushort NumViews; | |
public ViewStats ViewStats; | |
public byte NumEncoders; | |
public EncoderStats EncoderStats; | |
} | |
public long CpuTimeFrame => ptr->CpuTimeFrame; | |
public void SetCpuTimeFrame(long value) => ptr->CpuTimeFrame = value; | |
public long CpuTimeBegin => ptr->CpuTimeBegin; | |
public void SetCpuTimeBegin(long value) => ptr->CpuTimeBegin = value; | |
public long CpuTimeEnd => ptr->CpuTimeEnd; | |
public void SetCpuTimeEnd(long value) => ptr->CpuTimeEnd = value; | |
public long CpuTimerFreq => ptr->CpuTimerFreq; | |
public void SetCpuTimerFreq(long value) => ptr->CpuTimerFreq = value; | |
public long GpuTimeBegin => ptr->GpuTimeBegin; | |
public void SetGpuTimeBegin(long value) => ptr->GpuTimeBegin = value; | |
public long GpuTimeEnd => ptr->GpuTimeEnd; | |
public void SetGpuTimeEnd(long value) => ptr->GpuTimeEnd = value; | |
public long GpuTimerFreq => ptr->GpuTimerFreq; | |
public void SetGpuTimerFreq(long value) => ptr->GpuTimerFreq = value; | |
public long WaitRender => ptr->WaitRender; | |
public void SetWaitRender(long value) => ptr->WaitRender = value; | |
public long WaitSubmit => ptr->WaitSubmit; | |
public void SetWaitSubmit(long value) => ptr->WaitSubmit = value; | |
public uint NumDraw => ptr->NumDraw; | |
public void SetNumDraw(uint value) => ptr->NumDraw = value; | |
public uint NumCompute => ptr->NumCompute; | |
public void SetNumCompute(uint value) => ptr->NumCompute = value; | |
public uint NumBlit => ptr->NumBlit; | |
public void SetNumBlit(uint value) => ptr->NumBlit = value; | |
public uint MaxGpuLatency => ptr->MaxGpuLatency; | |
public void SetMaxGpuLatency(uint value) => ptr->MaxGpuLatency = value; | |
public ushort NumDynamicIndexBuffers => ptr->NumDynamicIndexBuffers; | |
public void SetNumDynamicIndexBuffers(ushort value) => ptr->NumDynamicIndexBuffers = value; | |
public ushort NumDynamicVertexBuffers => ptr->NumDynamicVertexBuffers; | |
public void SetNumDynamicVertexBuffers(ushort value) => ptr->NumDynamicVertexBuffers = value; | |
public ushort NumFrameBuffers => ptr->NumFrameBuffers; | |
public void SetNumFrameBuffers(ushort value) => ptr->NumFrameBuffers = value; | |
public ushort NumIndexBuffers => ptr->NumIndexBuffers; | |
public void SetNumIndexBuffers(ushort value) => ptr->NumIndexBuffers = value; | |
public ushort NumOcclusionQueries => ptr->NumOcclusionQueries; | |
public void SetNumOcclusionQueries(ushort value) => ptr->NumOcclusionQueries = value; | |
public ushort NumPrograms => ptr->NumPrograms; | |
public void SetNumPrograms(ushort value) => ptr->NumPrograms = value; | |
public ushort NumShaders => ptr->NumShaders; | |
public void SetNumShaders(ushort value) => ptr->NumShaders = value; | |
public ushort NumTextures => ptr->NumTextures; | |
public void SetNumTextures(ushort value) => ptr->NumTextures = value; | |
public ushort NumUniforms => ptr->NumUniforms; | |
public void SetNumUniforms(ushort value) => ptr->NumUniforms = value; | |
public ushort NumVertexBuffers => ptr->NumVertexBuffers; | |
public void SetNumVertexBuffers(ushort value) => ptr->NumVertexBuffers = value; | |
public ushort NumVertexDecls => ptr->NumVertexDecls; | |
public void SetNumVertexDecls(ushort value) => ptr->NumVertexDecls = value; | |
public long TextureMemoryUsed => ptr->TextureMemoryUsed; | |
public void SetTextureMemoryUsed(long value) => ptr->TextureMemoryUsed = value; | |
public long RtMemoryUsed => ptr->RtMemoryUsed; | |
public void SetRtMemoryUsed(long value) => ptr->RtMemoryUsed = value; | |
public int TransientVbUsed => ptr->TransientVbUsed; | |
public void SetTransientVbUsed(int value) => ptr->TransientVbUsed = value; | |
public int TransientIbUsed => ptr->TransientIbUsed; | |
public void SetTransientIbUsed(int value) => ptr->TransientIbUsed = value; | |
public long GpuMemoryMax => ptr->GpuMemoryMax; | |
public void SetGpuMemoryMax(long value) => ptr->GpuMemoryMax = value; | |
public long GpuMemoryUsed => ptr->GpuMemoryUsed; | |
public void SetGpuMemoryUsed(long value) => ptr->GpuMemoryUsed = value; | |
public ushort Width => ptr->Width; | |
public void SetWidth(ushort value) => ptr->Width = value; | |
public ushort Height => ptr->Height; | |
public void SetHeight(ushort value) => ptr->Height = value; | |
public ushort TextWidth => ptr->TextWidth; | |
public void SetTextWidth(ushort value) => ptr->TextWidth = value; | |
public ushort TextHeight => ptr->TextHeight; | |
public void SetTextHeight(ushort value) => ptr->TextHeight = value; | |
public ushort NumViews => ptr->NumViews; | |
public void SetNumViews(ushort value) => ptr->NumViews = value; | |
public ViewStats ViewStats => ptr->ViewStats; | |
public void SetViewStats(ViewStats value) => ptr->ViewStats = value; | |
public byte NumEncoders => ptr->NumEncoders; | |
public void SetNumEncoders(byte value) => ptr->NumEncoders = value; | |
public EncoderStats EncoderStats => ptr->EncoderStats; | |
public void SetEncoderStats(EncoderStats value) => ptr->EncoderStats = value; | |
} | |
public unsafe partial struct Texture | |
{ | |
//bgfx_texture_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct TextureInfo : IDisposable | |
{ | |
//bgfx_texture_info_t | |
private TextureInfo(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static TextureInfo New(in Data val = default) => new TextureInfo(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public TextureInfo AsPtr() { fixed(Data* ptr = &this) return new TextureInfo(ptr); } | |
public TextureFormat Format; | |
public uint StorageSize; | |
public ushort Width; | |
public ushort Height; | |
public ushort Depth; | |
public ushort NumLayers; | |
public byte NumMips; | |
public byte BitsPerPixel; | |
public bool CubeMap; | |
} | |
public TextureFormat Format => ptr->Format; | |
public void SetFormat(TextureFormat value) => ptr->Format = value; | |
public uint StorageSize => ptr->StorageSize; | |
public void SetStorageSize(uint value) => ptr->StorageSize = value; | |
public ushort Width => ptr->Width; | |
public void SetWidth(ushort value) => ptr->Width = value; | |
public ushort Height => ptr->Height; | |
public void SetHeight(ushort value) => ptr->Height = value; | |
public ushort Depth => ptr->Depth; | |
public void SetDepth(ushort value) => ptr->Depth = value; | |
public ushort NumLayers => ptr->NumLayers; | |
public void SetNumLayers(ushort value) => ptr->NumLayers = value; | |
public byte NumMips => ptr->NumMips; | |
public void SetNumMips(byte value) => ptr->NumMips = value; | |
public byte BitsPerPixel => ptr->BitsPerPixel; | |
public void SetBitsPerPixel(byte value) => ptr->BitsPerPixel = value; | |
public bool CubeMap => ptr->CubeMap; | |
public void SetCubeMap(bool value) => ptr->CubeMap = value; | |
} | |
public unsafe partial struct Transform : IDisposable | |
{ | |
//bgfx_transform_t | |
private Transform(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static Transform New(in Data val = default) => new Transform(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public Transform AsPtr() { fixed(Data* ptr = &this) return new Transform(ptr); } | |
public float* data; | |
public ushort Num; | |
} | |
public float* data => ptr->data; | |
public void SetData(float* value) => ptr->data = value; | |
public ushort Num => ptr->Num; | |
public void SetNum(ushort value) => ptr->Num = value; | |
} | |
public unsafe partial struct TransientIndexBuffer : IDisposable | |
{ | |
//bgfx_transient_index_buffer_t | |
private TransientIndexBuffer(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static TransientIndexBuffer New(in Data val = default) => new TransientIndexBuffer(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public TransientIndexBuffer AsPtr() { fixed(Data* ptr = &this) return new TransientIndexBuffer(ptr); } | |
public byte* data; | |
public uint Size; | |
public IndexBuffer Handle; | |
public uint StartIndex; | |
} | |
public byte* data => ptr->data; | |
public void SetData(byte* value) => ptr->data = value; | |
public uint Size => ptr->Size; | |
public void SetSize(uint value) => ptr->Size = value; | |
public IndexBuffer Handle => ptr->Handle; | |
public void SetHandle(IndexBuffer value) => ptr->Handle = value; | |
public uint StartIndex => ptr->StartIndex; | |
public void SetStartIndex(uint value) => ptr->StartIndex = value; | |
} | |
public unsafe partial struct TransientVertexBuffer : IDisposable | |
{ | |
//bgfx_transient_vertex_buffer_t | |
private TransientVertexBuffer(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static TransientVertexBuffer New(in Data val = default) => new TransientVertexBuffer(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public TransientVertexBuffer AsPtr() { fixed(Data* ptr = &this) return new TransientVertexBuffer(ptr); } | |
public byte* data; | |
public uint Size; | |
public uint StartVertex; | |
public ushort Stride; | |
public VertexBuffer Handle; | |
public VertexDeclaration Decl; | |
} | |
public byte* data => ptr->data; | |
public void SetData(byte* value) => ptr->data = value; | |
public uint Size => ptr->Size; | |
public void SetSize(uint value) => ptr->Size = value; | |
public uint StartVertex => ptr->StartVertex; | |
public void SetStartVertex(uint value) => ptr->StartVertex = value; | |
public ushort Stride => ptr->Stride; | |
public void SetStride(ushort value) => ptr->Stride = value; | |
public VertexBuffer Handle => ptr->Handle; | |
public void SetHandle(VertexBuffer value) => ptr->Handle = value; | |
public VertexDeclaration Decl => ptr->Decl; | |
public void SetDecl(VertexDeclaration value) => ptr->Decl = value; | |
} | |
public unsafe partial struct Uniform | |
{ | |
//bgfx_uniform_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct UniformInfo : IDisposable | |
{ | |
//bgfx_uniform_info_t | |
private UniformInfo(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static UniformInfo New(in Data val = default) => new UniformInfo(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public UniformInfo AsPtr() { fixed(Data* ptr = &this) return new UniformInfo(ptr); } | |
public fixed byte Name[256]; | |
public UniformType Type; | |
public ushort Num; | |
} | |
public UniformType Type => ptr->Type; | |
public void SetType(UniformType value) => ptr->Type = value; | |
public ushort Num => ptr->Num; | |
public void SetNum(ushort value) => ptr->Num = value; | |
} | |
public unsafe partial struct VertexBuffer | |
{ | |
//bgfx_vertex_buffer_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct VertexDecl : IDisposable | |
{ | |
//bgfx_vertex_decl_t | |
private VertexDecl(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static VertexDecl New(in Data val = default) => new VertexDecl(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public VertexDecl AsPtr() { fixed(Data* ptr = &this) return new VertexDecl(ptr); } | |
public uint Hash; | |
public ushort Stride; | |
public fixed ushort Offset[18]; | |
public fixed ushort Attributes[18]; | |
} | |
public uint Hash => ptr->Hash; | |
public void SetHash(uint value) => ptr->Hash = value; | |
public ushort Stride => ptr->Stride; | |
public void SetStride(ushort value) => ptr->Stride = value; | |
} | |
public unsafe partial struct VertexDeclaration | |
{ | |
//bgfx_vertex_decl_handle_t | |
public ushort Idx; | |
} | |
public unsafe partial struct ViewStats : IDisposable | |
{ | |
//bgfx_view_stats_t | |
private ViewStats(Data* ptr) | |
{ | |
this.ptr = ptr; | |
} | |
public static ViewStats New(in Data val = default) => new ViewStats(Alloc(in val)); | |
public void Dispose() | |
{ | |
if(ptr != null) Free(ptr); | |
} | |
Data* ptr; | |
public unsafe partial struct Data | |
{ | |
public ViewStats AsPtr() { fixed(Data* ptr = &this) return new ViewStats(ptr); } | |
public fixed byte Name[256]; | |
public ViewId View; | |
public long CpuTimeElapsed; | |
public long GpuTimeElapsed; | |
} | |
public ViewId View => ptr->View; | |
public void SetView(ViewId value) => ptr->View = value; | |
public long CpuTimeElapsed => ptr->CpuTimeElapsed; | |
public void SetCpuTimeElapsed(long value) => ptr->CpuTimeElapsed = value; | |
public long GpuTimeElapsed => ptr->GpuTimeElapsed; | |
public void SetGpuTimeElapsed(long value) => ptr->GpuTimeElapsed = value; | |
} | |
//bgfx_caps | |
public unsafe partial struct Caps | |
{ | |
IntPtr ptr; | |
public Caps(IntPtr ptr) => this.ptr = ptr; | |
} | |
//bgfx_encoder_s | |
public unsafe partial struct Encoder | |
{ | |
IntPtr ptr; | |
public Encoder(IntPtr ptr) => this.ptr = ptr; | |
} | |
public unsafe partial struct ViewId | |
{ | |
public ViewId(UInt16 value) | |
{ | |
Value = value; | |
} | |
public UInt16 Value; | |
} | |
//bgfx_backbuffer_ratio_t | |
public enum BackbufferRatio : Int32 | |
{ | |
Equal = 0, | |
Half = 1, | |
Quarter = 2, | |
Eighth = 3, | |
Sixteenth = 4, | |
Double = 5, | |
Count = 6, | |
} | |
//bgfx_access_t | |
public enum BufferAccess : Int32 | |
{ | |
Read = 0, | |
Write = 1, | |
Readwrite = 2, | |
Count = 3, | |
} | |
//bgfx_fatal_t | |
public enum Fatal : Int32 | |
{ | |
DebugCheck = 0, | |
InvalidShader = 1, | |
UnableToInitialize = 2, | |
UnableToCreateTexture = 3, | |
DeviceLost = 4, | |
Count = 5, | |
} | |
//bgfx_occlusion_query_result_t | |
public enum OcclusionQueryResult : Int32 | |
{ | |
Invisible = 0, | |
Visible = 1, | |
Noresult = 2, | |
Count = 3, | |
} | |
//bgfx_renderer_type_t | |
public enum RendererType : Int32 | |
{ | |
Noop = 0, | |
Direct3d9 = 1, | |
Direct3d11 = 2, | |
Direct3d12 = 3, | |
Gnm = 4, | |
Metal = 5, | |
Opengles = 6, | |
Opengl = 7, | |
Vulkan = 8, | |
Count = 9, | |
} | |
//bgfx_render_frame_t | |
public enum RenderFrame : Int32 | |
{ | |
NoContext = 0, | |
Render = 1, | |
Timeout = 2, | |
Exiting = 3, | |
Count = 4, | |
} | |
//bgfx_texture_format_t | |
public enum TextureFormat : Int32 | |
{ | |
Bc1 = 0, | |
Bc2 = 1, | |
Bc3 = 2, | |
Bc4 = 3, | |
Bc5 = 4, | |
Bc6h = 5, | |
Bc7 = 6, | |
Etc1 = 7, | |
Etc2 = 8, | |
Etc2a = 9, | |
Etc2a1 = 10, | |
Ptc12 = 11, | |
Ptc14 = 12, | |
Ptc12a = 13, | |
Ptc14a = 14, | |
Ptc22 = 15, | |
Ptc24 = 16, | |
Atc = 17, | |
Atce = 18, | |
Atci = 19, | |
Astc4x4 = 20, | |
Astc5x5 = 21, | |
Astc6x6 = 22, | |
Astc8x5 = 23, | |
Astc8x6 = 24, | |
Astc10x5 = 25, | |
Unknown = 26, | |
R1 = 27, | |
A8 = 28, | |
R8 = 29, | |
R8i = 30, | |
R8u = 31, | |
R8s = 32, | |
R16 = 33, | |
R16i = 34, | |
R16u = 35, | |
R16f = 36, | |
R16s = 37, | |
R32i = 38, | |
R32u = 39, | |
R32f = 40, | |
Rg8 = 41, | |
Rg8i = 42, | |
Rg8u = 43, | |
Rg8s = 44, | |
Rg16 = 45, | |
Rg16i = 46, | |
Rg16u = 47, | |
Rg16f = 48, | |
Rg16s = 49, | |
Rg32i = 50, | |
Rg32u = 51, | |
Rg32f = 52, | |
Rgb8 = 53, | |
Rgb8i = 54, | |
Rgb8u = 55, | |
Rgb8s = 56, | |
Rgb9e5f = 57, | |
Bgra8 = 58, | |
Rgba8 = 59, | |
Rgba8i = 60, | |
Rgba8u = 61, | |
Rgba8s = 62, | |
Rgba16 = 63, | |
Rgba16i = 64, | |
Rgba16u = 65, | |
Rgba16f = 66, | |
Rgba16s = 67, | |
Rgba32i = 68, | |
Rgba32u = 69, | |
Rgba32f = 70, | |
R5g6b5 = 71, | |
Rgba4 = 72, | |
Rgb5a1 = 73, | |
Rgb10a2 = 74, | |
Rg11b10f = 75, | |
UnknownDepth = 76, | |
D16 = 77, | |
D24 = 78, | |
D24s8 = 79, | |
D32 = 80, | |
D16f = 81, | |
D24f = 82, | |
D32f = 83, | |
D0s8 = 84, | |
Count = 85, | |
} | |
//bgfx_topology_convert_t | |
public enum TopologyConvert : Int32 | |
{ | |
TriListFlipWinding = 0, | |
TriStripFlipWinding = 1, | |
TriListToLineList = 2, | |
TriStripToTriList = 3, | |
LineStripToLineList = 4, | |
Count = 5, | |
} | |
//bgfx_topology_sort_t | |
public enum TopologySort : Int32 | |
{ | |
DirectionFrontToBackMin = 0, | |
DirectionFrontToBackAvg = 1, | |
DirectionFrontToBackMax = 2, | |
DirectionBackToFrontMin = 3, | |
DirectionBackToFrontAvg = 4, | |
DirectionBackToFrontMax = 5, | |
DistanceFrontToBackMin = 6, | |
DistanceFrontToBackAvg = 7, | |
DistanceFrontToBackMax = 8, | |
DistanceBackToFrontMin = 9, | |
DistanceBackToFrontAvg = 10, | |
DistanceBackToFrontMax = 11, | |
Count = 12, | |
} | |
//bgfx_uniform_type_t | |
public enum UniformType : Int32 | |
{ | |
Sampler = 0, | |
End = 1, | |
Vec4 = 2, | |
Mat3 = 3, | |
Mat4 = 4, | |
Count = 5, | |
} | |
//bgfx_attrib_t | |
public enum VertexAttribute : Int32 | |
{ | |
Position = 0, | |
Normal = 1, | |
Tangent = 2, | |
Bitangent = 3, | |
Color0 = 4, | |
Color1 = 5, | |
Color2 = 6, | |
Color3 = 7, | |
Indices = 8, | |
Weight = 9, | |
Texcoord0 = 10, | |
Texcoord1 = 11, | |
Texcoord2 = 12, | |
Texcoord3 = 13, | |
Texcoord4 = 14, | |
Texcoord5 = 15, | |
Texcoord6 = 16, | |
Texcoord7 = 17, | |
Count = 18, | |
} | |
//bgfx_attrib_type_t | |
public enum VertexAttributeType : Int32 | |
{ | |
Uint8 = 0, | |
Uint10 = 1, | |
Int16 = 2, | |
Half = 3, | |
Float = 4, | |
Count = 5, | |
} | |
//bgfx_view_mode_t | |
public enum ViewMode : Int32 | |
{ | |
Default = 0, | |
Sequential = 1, | |
DepthAscending = 2, | |
DepthDescending = 3, | |
Ccount = 4, | |
} | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate bool CacheReadDelegate(CallbackInterface @this, ulong id, IntPtr data, uint size); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate uint CacheReadSizeDelegate(uint uint32_t, CallbackInterface @this, ulong id); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void CacheWriteDelegate(CallbackInterface @this, ulong id, IntPtr data, uint size); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void CaptureBeginDelegate(CallbackInterface @this, uint width, uint height, uint pitch, TextureFormat format, bool yflip); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void CaptureFrameDelegate(CallbackInterface @this, IntPtr data, uint size); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void FatalDelegate(CallbackInterface @this, string filePath, ushort line, Fatal code, string str); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void ProfilerBeginDelegate(CallbackInterface @this, string name, uint abgr, string filePath, ushort line); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void ProfilerEndDelegate(CallbackInterface @this); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate IntPtr ReallocDelegate(AllocatorInterface @this, IntPtr ptr, UIntPtr size, UIntPtr align, string file, uint line); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void ReleaseFnDelegate(IntPtr ptr, IntPtr userData); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void ScreenShotDelegate(CallbackInterface @this, string filePath, uint width, uint height, uint pitch, IntPtr data, uint size, bool yflip); | |
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | |
public unsafe delegate void TraceVargsDelegate(CallbackInterface @this, string filePath, ushort line, string format, IntPtr argList); | |
public unsafe partial struct GPUCapabilities | |
{ | |
//bgfx_caps_gpu_t4 | |
public GPUInfo _0, _1, _2, _3; | |
public GPUInfo this[int index] | |
{ | |
get | |
{ | |
fixed (GPUInfo* ptr = &_0) return *(ptr + index); | |
} | |
} | |
} | |
public unsafe static partial class Bgfx | |
{ | |
/// <summary> Add attribute to VertexDecl.</summary> | |
/// <param name="_attrib">[in] Attribute semantics. See: `bgfx::Attrib`</param> | |
/// <param name="_num">[in] Number of elements 1, 2, 3 or 4.</param> | |
/// <param name="_type">[in] Element type.</param> | |
/// <param name="_normalized">[in] When using fixed point AttribType (f.e. Uint8) value will be normalized for vertex shader usage. When normalized is set to true, AttribType::Uint8 value in range 0-255 will be in range 0.0-1.0 in vertex shader.</param> | |
/// <param name="_asInt">[in] Packaging rule for vertexPack, vertexUnpack, and vertexConvert for AttribType::Uint8 and AttribType::Int16. Unpacking code must be implemented inside vertex shader.</param> | |
/// <remarks> Must be called between begin/end. | |
/// C99 equivalent is `bgfx_vertex_decl_add`.</remarks> | |
///---------- | |
///void bgfx_vertex_decl_add(bgfx_vertex_decl_t *_decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_add", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Add(VertexDecl decl, VertexAttribute attrib, byte num, VertexAttributeType type, bool normalized, bool asInt); | |
/// <summary> Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.</summary> | |
/// <param name="_size">[in] Size to allocate.</param> | |
/// <remarks> C99 equivalent is `bgfx_alloc`.</remarks> | |
///---------- | |
///const bgfx_memory_t *bgfx_alloc(uint32_t _size) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Memory Alloc(uint size); | |
/// <summary> Allocate instance data buffer.</summary> | |
/// <param name="_idb">[out] InstanceDataBuffer structure is filled and is valid for duration of frame, and it can be reused for multiple draw calls.</param> | |
/// <param name="_num">[in] Number of instances.</param> | |
/// <param name="_stride">[in] Instance stride. Must be multiple of 16.</param> | |
/// <remarks> C99 equivalent is `bgfx_alloc_instance_data_buffer`.</remarks> | |
///---------- | |
///void bgfx_alloc_instance_data_buffer(bgfx_instance_data_buffer_t *_idb, uint32_t _num, uint16_t _stride) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc_instance_data_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void AllocInstanceDataBuffer(InstanceDataBuffer idb, uint num, ushort stride); | |
/// <summary> Reserve `_num` matrices in internal matrix cache.</summary> | |
/// <param name="_transform">[in] Pointer to `Transform` structure.</param> | |
/// <param name="_num">[in] Number of matrices.</param> | |
/// <returns> index into matrix cache.</returns> | |
/// <remarks> Pointer returned can be modifed until `bgfx::frame` is called. | |
/// C99 equivalent is `bgfx_alloc_transform`.</remarks> | |
///---------- | |
///uint32_t bgfx_alloc_transform(bgfx_transform_t *_transform, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc_transform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint AllocTransform(Transform transform, ushort num); | |
/// <summary> Reserve `_num` matrices in internal matrix cache.</summary> | |
/// <param name="_transform">[in] Pointer to `Transform` structure.</param> | |
/// <param name="_num">[in] Number of matrices.</param> | |
/// <returns> Index into matrix cache.</returns> | |
/// <remarks> Pointer returned can be modifed until `bgfx::frame` is called. | |
/// C99 equivalent is `bgfx_encoder_alloc_transform`.</remarks> | |
///---------- | |
///uint32_t bgfx_encoder_alloc_transform(struct bgfx_encoder_s *_encoder, bgfx_transform_t *_transform, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_alloc_transform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint AllocTransform(Encoder encoder, Transform transform, ushort num); | |
/// <summary> Check for required space and allocate transient vertex and index buffers. If both space requirements are satisfied function returns true.</summary> | |
/// <remarks> Only 16-bit index buffer is supported. | |
/// C99 equivalent is `bgfx_alloc_transient_buffers`.</remarks> | |
///---------- | |
///bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t *_tvb, const bgfx_vertex_decl_t *_decl, uint32_t _numVertices, bgfx_transient_index_buffer_t *_tib, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc_transient_buffers", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern bool AllocTransientBuffers(TransientVertexBuffer tvb, VertexDecl decl, uint numVertices, TransientIndexBuffer tib, uint numIndices); | |
/// <summary> Allocate transient index buffer.</summary> | |
/// <param name="_tib">[out] TransientIndexBuffer structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls.</param> | |
/// <param name="_num">[in] Number of indices to allocate.</param> | |
/// <remarks> Only 16-bit index buffer is supported. | |
/// C99 equivalent is `bgfx_alloc_transient_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_alloc_transient_index_buffer(bgfx_transient_index_buffer_t *_tib, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc_transient_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void AllocTransientIndexBuffer(TransientIndexBuffer tib, uint num); | |
/// <summary> Allocate transient vertex buffer.</summary> | |
/// <param name="_tvb">[out] TransientVertexBuffer structure is filled and is valid for the duration of frame, and it can be reused for multiple draw calls.</param> | |
/// <param name="_num">[in] Number of vertices to allocate.</param> | |
/// <param name="_decl">[in] Vertex declaration.</param> | |
/// <remarks> C99 equivalent is `bgfx_alloc_transient_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_t *_tvb, uint32_t _num, const bgfx_vertex_decl_t *_decl) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_alloc_transient_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void AllocTransientVertexBuffer(TransientVertexBuffer tvb, uint num, VertexDecl decl); | |
/// <summary> | |
/// struct bgfx_encoder_s *bgfx_begin() | |
/// </summary> | |
/// <remarks> | |
/// </remarks> | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_begin", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Encoder Begin(); | |
/// <summary> Start VertexDecl.</summary> | |
/// <remarks> C99 equivalent is `bgfx_vertex_decl_begin`.</remarks> | |
///---------- | |
///void bgfx_vertex_decl_begin(bgfx_vertex_decl_t *_decl, bgfx_renderer_type_t _renderer) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_begin", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Begin(VertexDecl decl, RendererType renderer); | |
/// <summary> Blit texture region between two textures.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_dst">[in] Destination texture handle.</param> | |
/// <param name="_dstMip">[in] Destination texture mip level.</param> | |
/// <param name="_dstX">[in] Destination texture X position.</param> | |
/// <param name="_dstY">[in] Destination texture Y position.</param> | |
/// <param name="_dstZ">[in] If texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture this argument represents destination texture Z position.</param> | |
/// <param name="_src">[in] Source texture handle.</param> | |
/// <param name="_srcMip">[in] Source texture mip level.</param> | |
/// <param name="_srcX">[in] Source texture X position.</param> | |
/// <param name="_srcY">[in] Source texture Y position.</param> | |
/// <param name="_srcZ">[in] If texture is 2D this argument should be 0. If source texture is cube this argument represents source texture cube face. For 3D texture this argument represents source texture Z position.</param> | |
/// <param name="_width">[in] Width of region.</param> | |
/// <param name="_height">[in] Height of region.</param> | |
/// <param name="_depth">[in] If texture is 3D this argument represents depth of region, otherwise it's unused.</param> | |
/// <remarks> Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. | |
/// Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. | |
/// C99 equivalent is `bgfx_blit`.</remarks> | |
///---------- | |
///void bgfx_blit(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_blit", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Blit(ViewId id, Texture dst, byte dstMip, ushort dstX, ushort dstY, ushort dstZ, Texture src, byte srcMip, ushort srcX, ushort srcY, ushort srcZ, ushort width, ushort height, ushort depth); | |
/// <summary> Blit texture region between two textures.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_dst">[in] Destination texture handle.</param> | |
/// <param name="_dstMip">[in] Destination texture mip level.</param> | |
/// <param name="_dstX">[in] Destination texture X position.</param> | |
/// <param name="_dstY">[in] Destination texture Y position.</param> | |
/// <param name="_dstZ">[in] If texture is 2D this argument should be 0. If destination texture is cube this argument represents destination texture cube face. For 3D texture this argument represents destination texture Z position.</param> | |
/// <param name="_src">[in] Source texture handle.</param> | |
/// <param name="_srcMip">[in] Source texture mip level.</param> | |
/// <param name="_srcX">[in] Source texture X position.</param> | |
/// <param name="_srcY">[in] Source texture Y position.</param> | |
/// <param name="_srcZ">[in] If texture is 2D this argument should be 0. If source texture is cube this argument represents source texture cube face. For 3D texture this argument represents source texture Z position.</param> | |
/// <param name="_width">[in] Width of region.</param> | |
/// <param name="_height">[in] Height of region.</param> | |
/// <param name="_depth">[in] If texture is 3D this argument represents depth of region, otherwise it's unused.</param> | |
/// <remarks> Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. | |
/// Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. | |
/// C99 equivalent is `bgfx_encoder_blit`.</remarks> | |
///---------- | |
///void bgfx_encoder_blit(struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_blit", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Blit(Encoder encoder, ViewId id, Texture dst, byte dstMip, ushort dstX, ushort dstY, ushort dstZ, Texture src, byte srcMip, ushort srcX, ushort srcY, ushort srcZ, ushort width, ushort height, ushort depth); | |
/// <summary> Calculate amount of memory required for texture.</summary> | |
/// <param name="_info">[out] Resulting texture info structure. See: `TextureInfo`.</param> | |
/// <param name="_width">[in] Width.</param> | |
/// <param name="_height">[in] Height.</param> | |
/// <param name="_depth">[in] Depth dimension of volume texture.</param> | |
/// <param name="_cubeMap">[in] Indicates that texture contains cubemap.</param> | |
/// <param name="_hasMips">[in] Indicates that texture contains full mip-map chain.</param> | |
/// <param name="_numLayers">[in] Number of layers in texture array.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_calc_texture_size`.</remarks> | |
///---------- | |
///void bgfx_calc_texture_size(bgfx_texture_info_t *_info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_calc_texture_size", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void CalcTextureSize(TextureInfo info, ushort width, ushort height, ushort depth, bool cubeMap, bool hasMips, ushort numLayers, TextureFormat format); | |
/// <summary> Allocate buffer and copy data into it. Data will be freed inside bgfx.</summary> | |
/// <param name="_data">[in] Pointer to data to be copied.</param> | |
/// <param name="_size">[in] Size of data to be copied.</param> | |
/// <remarks> C99 equivalent is `bgfx_copy`.</remarks> | |
///---------- | |
///const bgfx_memory_t *bgfx_copy(const void *_data, uint32_t _size) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_copy", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Memory Copy(IntPtr data, uint size); | |
/// <summary> Create empty dynamic index buffer.</summary> | |
/// <param name="_num">[in] Number of indices.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <returns> Dynamic index buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_dynamic_index_buffer`.</remarks> | |
///---------- | |
///bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint32_t _num, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern DynamicIndexBuffer CreateDynamicIndexBuffer(uint num, BufferFlags flags); | |
/// <summary> Create dynamic index buffer and initialized it.</summary> | |
/// <param name="_mem">[in] Index buffer data.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <returns> Dynamic index buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_dynamic_index_buffer_mem`.</remarks> | |
///---------- | |
///bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer_mem(const bgfx_memory_t *_mem, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_dynamic_index_buffer_mem", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern DynamicIndexBuffer CreateDynamicIndexBuffer(Memory mem, BufferFlags flags); | |
/// <summary> Create empty dynamic vertex buffer.</summary> | |
/// <param name="_num">[in] Number of vertices.</param> | |
/// <param name="_decl">[in] Vertex declaration.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <returns> Dynamic vertex buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer( uint32_t _num, const bgfx_vertex_decl_t *_decl, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern DynamicVertexBuffer CreateDynamicVertexBuffer(uint num, VertexDecl decl, BufferFlags flags); | |
/// <summary> Create dynamic vertex buffer and initialize it.</summary> | |
/// <param name="_mem">[in] Vertex buffer data.</param> | |
/// <param name="_decl">[in] Vertex declaration.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <returns> Dynamic vertex buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_dynamic_vertex_buffer_mem`.</remarks> | |
///---------- | |
///bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer_mem( const bgfx_memory_t *_mem, const bgfx_vertex_decl_t *_decl, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_dynamic_vertex_buffer_mem", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern DynamicVertexBuffer CreateDynamicVertexBuffer(Memory mem, VertexDecl decl, BufferFlags flags); | |
/// <summary> Create frame buffer (simple).</summary> | |
/// <param name="_width">[in] Texture width.</param> | |
/// <param name="_height">[in] Texture height.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_textureFlags">[in] Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <returns> Handle to frame buffer object.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_frame_buffer`.</remarks> | |
///---------- | |
///bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint64_t _textureFlags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_frame_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern FrameBuffer CreateFrameBuffer(ushort width, ushort height, TextureFormat format, ulong textureFlags); | |
/// <summary> Create MRT frame buffer from texture handles with specific layer and mip level.</summary> | |
/// <param name="_num">[in] Number of texture attachments.</param> | |
/// <param name="_attachment">[in] Attachment texture info. See: `bgfx::Attachment`.</param> | |
/// <param name="_destroyTextures">[in] If true, textures will be destroyed when frame buffer is destroyed.</param> | |
/// <returns> Handle to frame buffer object.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_frame_buffer_from_attachment`.</remarks> | |
///---------- | |
///bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment( uint8_t _num, const bgfx_attachment_t *_attachment, bool _destroyTextures) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_frame_buffer_from_attachment", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern FrameBuffer CreateFrameBuffer(byte num, Attachment attachment, bool destroyTextures); | |
/// <summary> Create MRT frame buffer from texture handles (simple).</summary> | |
/// <param name="_num">[in] Number of texture attachments.</param> | |
/// <param name="_handles">[in] Texture attachments.</param> | |
/// <param name="_destroyTextures">[in] If true, textures will be destroyed when frame buffer is destroyed.</param> | |
/// <returns> Handle to frame buffer object.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_frame_buffer_from_handles`.</remarks> | |
///---------- | |
///bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles( uint8_t _num, const bgfx_texture_handle_t *_handles, bool _destroyTextures) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_frame_buffer_from_handles", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern FrameBuffer CreateFrameBuffer(byte num, Texture* handles, bool destroyTextures); | |
/// <summary> Create frame buffer for multiple window rendering.</summary> | |
/// <param name="_nwh">[in] OS' target native window handle.</param> | |
/// <param name="_width">[in] Window back buffer width.</param> | |
/// <param name="_height">[in] Window back buffer height.</param> | |
/// <param name="_format">[in] Window back buffer color format.</param> | |
/// <param name="_depthFormat">[in] Window back buffer depth format.</param> | |
/// <returns> Handle to frame buffer object.</returns> | |
/// <remarks> Frame buffer cannot be used for sampling. | |
/// C99 equivalent is `bgfx_create_frame_buffer_from_nwh`.</remarks> | |
///---------- | |
///bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void *_nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_frame_buffer_from_nwh", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern FrameBuffer CreateFrameBuffer(IntPtr nwh, ushort width, ushort height, TextureFormat format, TextureFormat depthFormat); | |
/// <summary> Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio if back buffer resolution changes.</summary> | |
/// <param name="_ratio">[in] Frame buffer size in respect to back-buffer size. See: `BackbufferRatio::Enum`.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_textureFlags">[in] Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <returns> Handle to frame buffer object.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_frame_buffer_scaled`.</remarks> | |
///---------- | |
///bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint64_t _textureFlags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_frame_buffer_scaled", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern FrameBuffer CreateFrameBuffer(BackbufferRatio ratio, TextureFormat format, ulong textureFlags); | |
/// <summary> Create static index buffer.</summary> | |
/// <param name="_mem">[in] Index buffer data.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <remarks> C99 equivalent is `bgfx_create_index_buffer`.</remarks> | |
///---------- | |
///bgfx_index_buffer_handle_t bgfx_create_index_buffer(const bgfx_memory_t *_mem, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern IndexBuffer CreateIndexBuffer(Memory mem, BufferFlags flags); | |
/// <summary> Create draw indirect buffer.</summary> | |
/// <param name="_num">[in] Number of indirect calls.</param> | |
/// <returns> Indirect buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_indirect_buffer`.</remarks> | |
///---------- | |
///bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_indirect_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern IndirectBuffer CreateIndirectBuffer(uint num); | |
/// <summary> Create occlusion query.</summary> | |
/// <returns> Handle to occlusion query object.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_occlusion_query`.</remarks> | |
///---------- | |
///bgfx_occlusion_query_handle_t bgfx_create_occlusion_query() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_occlusion_query", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern OcclusionQuery CreateOcclusionQuery(); | |
/// <summary> Create program with compute shader.</summary> | |
/// <param name="_csh">[in] Compute shader.</param> | |
/// <returns> Program handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_compute_program`.</remarks> | |
///---------- | |
///bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_t _csh, bool _destroyShaders) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_compute_program", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ShaderProgram CreateProgram(Shader csh, bool destroyShaders); | |
/// <summary> Create program with vertex and fragment shaders.</summary> | |
/// <param name="_vsh">[in] Vertex shader.</param> | |
/// <param name="_fsh">[in] Fragment shader.</param> | |
/// <param name="_destroyShaders">[in] If true, shaders will be destroyed when program is destroyed.</param> | |
/// <returns> Program handle if vertex shader output and fragment shader input are matching, otherwise returns invalid program handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_program`.</remarks> | |
///---------- | |
///bgfx_program_handle_t bgfx_create_program(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_program", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ShaderProgram CreateProgram(Shader vsh, Shader fsh, bool destroyShaders); | |
/// <summary> Create shader from memory buffer.</summary> | |
/// <remarks> C99 equivalent is `bgfx_create_shader`.</remarks> | |
///---------- | |
///bgfx_shader_handle_t bgfx_create_shader(const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_shader", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Shader CreateShader(Memory mem); | |
/// <summary> Create texture from memory buffer.</summary> | |
/// <param name="_mem">[in] DDS, KTX or PVR texture data.</param> | |
/// <param name="_flags">[in] Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <param name="_skip">[in] Skip top level mips when parsing texture.</param> | |
/// <param name="_info">[out] When non-`NULL` is specified it returns parsed texture information.</param> | |
/// <returns> Texture handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_texture`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_create_texture(const bgfx_memory_t *_mem, uint64_t _flags, uint8_t _skip, bgfx_texture_info_t *_info) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture CreateTexture(Memory mem, TextureFlags flags, byte skip, TextureInfo info); | |
/// <summary> Create 2D texture.</summary> | |
/// <param name="_width">[in] Width.</param> | |
/// <param name="_height">[in] Height.</param> | |
/// <param name="_hasMips">[in] Indicates that texture contains full mip-map chain.</param> | |
/// <param name="_numLayers">[in] Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <param name="_mem">[in] Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.</param> | |
/// <remarks> C99 equivalent is `bgfx_create_texture_2d`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_create_texture_2d(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_texture_2d", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture CreateTexture2D(ushort width, ushort height, bool hasMips, ushort numLayers, TextureFormat format, TextureFlags flags, Memory mem); | |
/// <summary> Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio if back buffer resolution changes.</summary> | |
/// <param name="_ratio">[in] Frame buffer size in respect to back-buffer size. See: `BackbufferRatio::Enum`.</param> | |
/// <param name="_hasMips">[in] Indicates that texture contains full mip-map chain.</param> | |
/// <param name="_numLayers">[in] Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <remarks> C99 equivalent is `bgfx_create_texture_2d_scaled`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_texture_2d_scaled", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture CreateTexture2D(BackbufferRatio ratio, bool hasMips, ushort numLayers, TextureFormat format, TextureFlags flags); | |
/// <summary> Create 3D texture.</summary> | |
/// <param name="_width">[in] Width.</param> | |
/// <param name="_height">[in] Height.</param> | |
/// <param name="_depth">[in] Depth.</param> | |
/// <param name="_hasMips">[in] Indicates that texture contains full mip-map chain.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <param name="_mem">[in] Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized.</param> | |
/// <remarks> C99 equivalent is `bgfx_create_texture_3d`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_create_texture_3d(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_texture_3d", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture CreateTexture3D(ushort width, ushort height, ushort depth, bool hasMips, TextureFormat format, TextureFlags flags, Memory mem); | |
/// <summary> Create Cube texture.</summary> | |
/// <param name="_size">[in] Cube side size.</param> | |
/// <param name="_hasMips">[in] Indicates that texture contains full mip-map chain.</param> | |
/// <param name="_numLayers">[in] Number of layers in texture array. Must be 1 if caps `BGFX_CAPS_TEXTURE_CUBE_ARRAY` flag is not set.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`) flags. Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <param name="_mem">[in] Texture data. If `_mem` is non-NULL, created texture will be immutable. If `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than 1, expected memory layout is texture and all mips together for each array element.</param> | |
/// <remarks> C99 equivalent is `bgfx_create_texture_cube`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_texture_cube", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture CreateTextureCube(ushort size, bool hasMips, ushort numLayers, TextureFormat format, TextureFlags flags, Memory mem); | |
/// <summary> Create shader uniform parameter.</summary> | |
/// <param name="_name">[in] Uniform name in shader.</param> | |
/// <param name="_type">[in] Type of uniform (See: `bgfx::UniformType`).</param> | |
/// <param name="_num">[in] Number of elements in array.</param> | |
/// <returns> Handle to uniform object.</returns> | |
/// <remarks> 1. Uniform names are unique. It's valid to call `bgfx::createUniform` multiple times with the same uniform name. The library will always return the same handle, but the handle reference count will be incremented. This means that the same number of `bgfx::destroyUniform` must be called to properly destroy the uniform. | |
/// 2. Predefined uniforms (declared in `bgfx_shader.sh`): - `u_viewRect vec4(x, y, width, height)` - view rectangle for current view, in pixels. - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse width and height - `u_view mat4` - view matrix - `u_invView mat4` - inverted view matrix - `u_proj mat4` - projection matrix - `u_invProj mat4` - inverted projection matrix - `u_viewProj mat4` - concatenated view projection matrix - `u_invViewProj mat4` - concatenated inverted view projection matrix - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices. - `u_modelView mat4` - concatenated model view matrix, only first model matrix from array is used. - `u_modelViewProj mat4` - concatenated model view projection matrix. - `u_alphaRef float` - alpha reference value for alpha test. | |
/// C99 equivalent is `bgfx_create_uniform`.</remarks> | |
///---------- | |
///bgfx_uniform_handle_t bgfx_create_uniform(const char *_name, bgfx_uniform_type_t _type, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_uniform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Uniform CreateUniform(string name, UniformType type, ushort num); | |
/// <summary> Create static vertex buffer.</summary> | |
/// <param name="_mem">[in] Vertex buffer data.</param> | |
/// <param name="_decl">[in] Vertex declaration.</param> | |
/// <param name="_flags">[in] Buffer creation flags. - `BGFX_BUFFER_NONE` - No flags. - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader. - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of data is passed. If this flag is not specified, and more data is passed on update, the buffer will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers. - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.</param> | |
/// <returns> Static vertex buffer handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_create_vertex_buffer`.</remarks> | |
///---------- | |
///bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const bgfx_memory_t *_mem, const bgfx_vertex_decl_t *_decl, uint16_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_create_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern VertexBuffer CreateVertexBuffer(Memory mem, VertexDecl decl, BufferFlags flags); | |
/// <summary> Clear internal debug text buffer.</summary> | |
/// <param name="_attr">[in] Background color.</param> | |
/// <param name="_small">[in] Default or 8x8 font.</param> | |
/// <remarks> C99 equivalent is `bgfx_dbg_text_clear`.</remarks> | |
///---------- | |
///void bgfx_dbg_text_clear(uint8_t _attr, bool _small) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dbg_text_clear", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void DbgTextClear(byte attr, bool small); | |
/// <summary> Draw image into internal debug text buffer.</summary> | |
/// <param name="_data">[in] Raw image data (character/attribute raw encoding).</param> | |
/// <param name="_pitch">[in] Image pitch in bytes.</param> | |
/// <remarks> C99 equivalent is `bgfx_dbg_text_image`.</remarks> | |
///---------- | |
///void bgfx_dbg_text_image(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void *_data, uint16_t _pitch) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dbg_text_image", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void DbgTextImage(ushort x, ushort y, ushort width, ushort height, IntPtr data, ushort pitch); | |
/// <summary> | |
/// void bgfx_dbg_text_printf(uint16_t _x, uint16_t _y, uint8_t _attr, | |
/// const char *_format, ...) | |
/// </summary> | |
/// <remarks> | |
/// </remarks> | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dbg_text_printf", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void DbgTextPrintfVargs(ushort x, ushort y, byte attr, string format); | |
/// <summary> Print into internal debug text character-buffer (VGA-compatible text mode).</summary> | |
/// <param name="_attr">[in] Color palette. Where top 4-bits represent index of background, and bottom 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).</param> | |
/// <param name="_format">[in] `printf` style format.</param> | |
/// <param name="_argList">[in] additional arguments for format string</param> | |
/// <remarks> C99 equivalent is `bgfx_dbg_text_vprintf`.</remarks> | |
///---------- | |
///void bgfx_dbg_text_vprintf(uint16_t _x, uint16_t _y, uint8_t _attr, const char *_format, va_list _argList) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dbg_text_vprintf", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void DbgTextPrintfVargs(ushort x, ushort y, byte attr, string format, IntPtr argList); | |
/// <summary> Decode attribute.</summary> | |
/// <remarks> C99 equivalent is `bgfx_vertex_decl_decode`.</remarks> | |
///---------- | |
///void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t *_decl, bgfx_attrib_t _attrib, uint8_t *_num, bgfx_attrib_type_t *_type, bool *_normalized, bool *_asInt) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_decode", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Decode(VertexDecl decl, VertexAttribute attrib, out byte num, VertexAttributeType* type, out bool normalized, out bool asInt); | |
/// <summary> Destroy dynamic index buffer.</summary> | |
/// <param name="_handle">[in] Dynamic index buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_dynamic_index_buffer( bgfx_dynamic_index_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(DynamicIndexBuffer handle); | |
/// <summary> Destroy dynamic vertex buffer.</summary> | |
/// <param name="_handle">[in] Dynamic vertex buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_dynamic_vertex_buffer( bgfx_dynamic_vertex_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(DynamicVertexBuffer handle); | |
/// <summary> Destroy frame buffer.</summary> | |
/// <param name="_handle">[in] Frame buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_frame_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_frame_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(FrameBuffer handle); | |
/// <summary> Destroy static index buffer.</summary> | |
/// <param name="_handle">[in] Static index buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_index_buffer(bgfx_index_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(IndexBuffer handle); | |
/// <summary> Destroy draw indirect buffer.</summary> | |
/// <param name="_handle">[in] Indirect buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_indirect_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_indirect_buffer(bgfx_indirect_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_indirect_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(IndirectBuffer handle); | |
/// <summary> Destroy occlusion query.</summary> | |
/// <param name="_handle">[in] Handle to occlusion query object.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_occlusion_query`.</remarks> | |
///---------- | |
///void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_occlusion_query", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(OcclusionQuery handle); | |
/// <summary> Destroy program.</summary> | |
/// <param name="_handle">[in] Program handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_program`.</remarks> | |
///---------- | |
///void bgfx_destroy_program(bgfx_program_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_program", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(ShaderProgram handle); | |
/// <summary> Destroy shader. Once a shader program is created with _handle, it is safe to destroy that shader.</summary> | |
/// <param name="_handle">[in] Shader handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_shader`.</remarks> | |
///---------- | |
///void bgfx_destroy_shader(bgfx_shader_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_shader", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(Shader handle); | |
/// <summary> Destroy texture.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_texture`.</remarks> | |
///---------- | |
///void bgfx_destroy_texture(bgfx_texture_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(Texture handle); | |
/// <summary> Destroy shader uniform parameter.</summary> | |
/// <param name="_handle">[in] Handle to uniform object.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_uniform`.</remarks> | |
///---------- | |
///void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_uniform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(Uniform handle); | |
/// <summary> Destroy static vertex buffer.</summary> | |
/// <param name="_handle">[in] Static vertex buffer handle.</param> | |
/// <remarks> C99 equivalent is `bgfx_destroy_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_destroy_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Destroy(VertexBuffer handle); | |
/// <summary> Discard all previously set state for draw or compute call.</summary> | |
/// <remarks> C99 equivalent is `bgfx_discard`.</remarks> | |
///---------- | |
///void bgfx_discard() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_discard", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Discard(); | |
/// <summary> Discard all previously set state for draw or compute call.</summary> | |
/// <remarks> C99 equivalent is `bgfx_encoder_discard`.</remarks> | |
///---------- | |
///void bgfx_encoder_discard(struct bgfx_encoder_s *_encoder) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_discard", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Discard(Encoder encoder); | |
/// <summary> Dispatch compute.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_handle">[in] Compute program.</param> | |
/// <param name="_numX">[in] Number of groups X.</param> | |
/// <param name="_numY">[in] Number of groups Y.</param> | |
/// <param name="_numZ">[in] Number of groups Z.</param> | |
/// <remarks> C99 equivalent is `bgfx_dispatch`.</remarks> | |
///---------- | |
///void bgfx_dispatch(bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dispatch", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Dispatch(ViewId id, ShaderProgram handle, uint numX, uint numY, uint numZ); | |
/// <summary> Dispatch compute indirect.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_handle">[in] Compute program.</param> | |
/// <param name="_indirectHandle">[in] Indirect buffer.</param> | |
/// <param name="_start">[in] First element in indirect buffer.</param> | |
/// <param name="_num">[in] Number of dispatches.</param> | |
/// <remarks> C99 equivalent is `bgfx_dispatch_indirect`.</remarks> | |
///---------- | |
///void bgfx_dispatch_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_dispatch_indirect", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Dispatch(ViewId id, ShaderProgram handle, IndirectBuffer indirectHandle, ushort start, ushort num); | |
/// <summary> Dispatch compute.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_handle">[in] Compute program.</param> | |
/// <param name="_numX">[in] Number of groups X.</param> | |
/// <param name="_numY">[in] Number of groups Y.</param> | |
/// <param name="_numZ">[in] Number of groups Z.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_dispatch`.</remarks> | |
///---------- | |
///void bgfx_encoder_dispatch(struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_dispatch", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Dispatch(Encoder encoder, ViewId id, ShaderProgram handle, uint numX, uint numY, uint numZ); | |
/// <summary> Dispatch compute indirect.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_handle">[in] Compute program.</param> | |
/// <param name="_indirectHandle">[in] Indirect buffer.</param> | |
/// <param name="_start">[in] First element in indirect buffer.</param> | |
/// <param name="_num">[in] Number of dispatches.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_dispatch_indirect`.</remarks> | |
///---------- | |
///void bgfx_encoder_dispatch_indirect( struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_dispatch_indirect", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Dispatch(Encoder encoder, ViewId id, ShaderProgram handle, IndirectBuffer indirectHandle, ushort start, ushort num); | |
/// <summary> | |
/// void bgfx_end(struct bgfx_encoder_s *_encoder) | |
/// </summary> | |
/// <remarks> | |
/// </remarks> | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_end", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void End(Encoder encoder); | |
/// <summary> End VertexDecl.</summary> | |
/// <remarks> C99 equivalent is `bgfx_vertex_decl_end`.</remarks> | |
///---------- | |
///void bgfx_vertex_decl_end(bgfx_vertex_decl_t *_decl) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_end", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void End(VertexDecl decl); | |
/// <summary> Advance to next frame. When using multithreaded renderer, this call just swaps internal buffers, kicks render thread, and returns. In singlethreaded renderer this call does frame rendering.</summary> | |
/// <param name="_capture">[in] Capture frame with graphics debugger.</param> | |
/// <returns> Current frame number. This might be used in conjunction with double/multi buffering data outside the library and passing it to library via `bgfx::makeRef` calls.</returns> | |
/// <remarks> C99 equivalent is `bgfx_frame`.</remarks> | |
///---------- | |
///uint32_t bgfx_frame(bool _capture) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_frame", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint Frame(bool capture); | |
/// <summary> Returns number of requested or maximum available instance buffer slots.</summary> | |
/// <param name="_num">[in] Number of required instances.</param> | |
/// <param name="_stride">[in] Stride per instance.</param> | |
/// <remarks> C99 equivalent is `bgfx_get_avail_instance_data_buffer`.</remarks> | |
///---------- | |
///uint32_t bgfx_get_avail_instance_data_buffer(uint32_t _num, uint16_t _stride) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_avail_instance_data_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint GetAvailInstanceDataBuffer(uint num, ushort stride); | |
/// <summary> Returns number of requested or maximum available indices.</summary> | |
/// <param name="_num">[in] Number of required indices.</param> | |
/// <remarks> C99 equivalent is `bgfx_get_avail_transient_index_buffer`.</remarks> | |
///---------- | |
///uint32_t bgfx_get_avail_transient_index_buffer(uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_avail_transient_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint GetAvailTransientIndexBuffer(uint num); | |
/// <summary> Returns number of requested or maximum available vertices.</summary> | |
/// <param name="_num">[in] Number of required vertices.</param> | |
/// <param name="_decl">[in] Vertex declaration.</param> | |
/// <remarks> C99 equivalent is `bgfx_get_avail_transient_vertex_buffer`.</remarks> | |
///---------- | |
///uint32_t bgfx_get_avail_transient_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t *_decl) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_avail_transient_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint GetAvailTransientVertexBuffer(uint num, VertexDecl decl); | |
/// <summary> Returns renderer capabilities.</summary> | |
/// <returns> Pointer to static `bgfx::Caps` structure.</returns> | |
/// <remarks> Library must be initialized. | |
/// C99 equivalent is `bgfx_get_caps`.</remarks> | |
///---------- | |
///const bgfx_caps_t *bgfx_get_caps() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_caps", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Capabilities GetCaps(); | |
/// <summary> Get internal data for interop.</summary> | |
/// <remarks> It's expected you understand some bgfx internals before you use this call. | |
/// Must be called only on render thread. | |
/// C99 equivalent is `bgfx_get_internal_data`.</remarks> | |
///---------- | |
///const bgfx_internal_data_t *bgfx_get_internal_data() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_internal_data", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern InternalData GetInternalData(); | |
/// <summary> Returns name of renderer.</summary> | |
/// <remarks> C99 equivalent is `bgfx_get_renderer_name`.</remarks> | |
///---------- | |
///const char *bgfx_get_renderer_name(bgfx_renderer_type_t _type) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_renderer_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern string GetRendererName(RendererType type); | |
/// <summary> Returns current renderer backend API type.</summary> | |
/// <remarks> Library must be initialized. | |
/// C99 equivalent is `bgfx_get_renderer_type`.</remarks> | |
///---------- | |
///bgfx_renderer_type_t bgfx_get_renderer_type() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_renderer_type", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern RendererType GetRendererType(); | |
/// <summary> Retrieve occlusion query result from previous frame.</summary> | |
/// <param name="_handle">[in] Handle to occlusion query object.</param> | |
/// <param name="_result">[out] Number of pixels that passed test. This argument can be `NULL` if result of occlusion query is not needed.</param> | |
/// <returns> Occlusion query result.</returns> | |
/// <remarks> C99 equivalent is `bgfx_get_result`.</remarks> | |
///---------- | |
///bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_handle_t _handle, int32_t *_result) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_result", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern OcclusionQueryResult GetResult(OcclusionQuery handle, out int result); | |
/// <summary> Returns the number of uniforms and uniform handles used inside a shader.</summary> | |
/// <param name="_handle">[in] Shader handle.</param> | |
/// <param name="_uniforms">[in] UniformHandle array where data will be stored.</param> | |
/// <param name="_max">[in] Maximum capacity of array.</param> | |
/// <returns> Number of uniforms used by shader.</returns> | |
/// <remarks> Only non-predefined uniforms are returned. | |
/// C99 equivalent is `bgfx_get_shader_uniforms`.</remarks> | |
///---------- | |
///uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t *_uniforms, uint16_t _max) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_shader_uniforms", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ushort GetShaderUniforms(Shader handle, Uniform* uniforms, ushort max); | |
/// <summary> Returns performance counters.</summary> | |
/// <remarks> Pointer returned is valid until `bgfx::frame` is called. | |
/// C99 equivalent is `bgfx_get_stats`.</remarks> | |
///---------- | |
///const bgfx_stats_t *bgfx_get_stats() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_stats", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Stats GetStats(); | |
/// <summary> Returns supported backend API renderers.</summary> | |
/// <param name="_max">[in] Maximum number of elements in _enum array.</param> | |
/// <param name="_enum">[in] Array where supported renderers will be written.</param> | |
/// <returns> Number of supported renderers.</returns> | |
/// <remarks> C99 equivalent is `bgfx_get_supported_renderers`.</remarks> | |
///---------- | |
///uint8_t bgfx_get_supported_renderers(uint8_t _max, bgfx_renderer_type_t *_enum) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_supported_renderers", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern byte GetSupportedRenderers(byte max, RendererType* @enum); | |
/// <summary> Obtain texture handle of frame buffer attachment.</summary> | |
/// <param name="_handle">[in] Frame buffer handle.</param> | |
/// <param name="_attachment">[in] Frame buffer attachment index.</param> | |
/// <returns> Returns invalid texture handle if attachment index is not correct, or frame buffer is created with native window handle.</returns> | |
/// <remarks> C99 equivalent is `bgfx_get_texture`.</remarks> | |
///---------- | |
///bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Texture GetTexture(FrameBuffer handle, byte attachment); | |
/// <summary> Retrieve uniform info.</summary> | |
/// <param name="_handle">[in] Handle to uniform object.</param> | |
/// <param name="_info">[out] Uniform info.</param> | |
/// <remarks> C99 equivalent is `bgfx_get_uniform_info`.</remarks> | |
///---------- | |
///void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t *_info) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_get_uniform_info", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void GetUniformInfo(Uniform handle, UniformInfo info); | |
/// <summary> Returns true if VertexDecl contains attribute.</summary> | |
/// <remarks> C99 equivalent is `bgfx_vertex_decl_has`.</remarks> | |
///---------- | |
///bool bgfx_vertex_decl_has(const bgfx_vertex_decl_t *_decl, bgfx_attrib_t _attrib) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_has", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern bool Has(VertexDecl decl, VertexAttribute attrib); | |
/// <summary> Initialize bgfx library.</summary> | |
/// <param name="_init">[in] Initialization parameters. See: `bgfx::Init` for more info.</param> | |
/// <returns> `true` if initialization was successful.</returns> | |
/// <remarks> C99 equivalent is `bgfx_init`.</remarks> | |
///---------- | |
///bool bgfx_init(const bgfx_init_t *_init) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_init", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern bool Init(BgfxInit init); | |
/// <summary> | |
/// void bgfx_init_ctor(bgfx_init_t *_init) | |
/// </summary> | |
/// <remarks> | |
/// </remarks> | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_init_ctor", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void InitCtor(BgfxInit init); | |
/// <summary> Validate texture parameters.</summary> | |
/// <param name="_depth">[in] Depth dimension of volume texture.</param> | |
/// <param name="_cubeMap">[in] Indicates that texture contains cubemap.</param> | |
/// <param name="_numLayers">[in] Number of layers in texture array.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Texture flags. See `BGFX_TEXTURE_*`.</param> | |
/// <returns> True if texture can be successfully created.</returns> | |
/// <remarks> C99 equivalent is `bgfx_is_texture_valid`.</remarks> | |
///---------- | |
///bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_is_texture_valid", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern bool IsTextureValid(ushort depth, bool cubeMap, ushort numLayers, TextureFormat format, TextureFlags flags); | |
/// <summary> Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call doesn't allocate memory for data. It just copies the _data pointer. You can pass `ReleaseFn` function pointer to release this memory after it's consumed, otherwise you must make sure _data is available for at least 2 `bgfx::frame` calls. `ReleaseFn` function must be able to be called from any thread.</summary> | |
/// <param name="_data">[in] Pointer to data.</param> | |
/// <param name="_size">[in] Size of data.</param> | |
/// <remarks> Data passed must be available for at least 2 `bgfx::frame` calls. | |
/// C99 equivalent are `bgfx_make_ref`, `bgfx_make_ref_release`.</remarks> | |
///---------- | |
///const bgfx_memory_t *bgfx_make_ref(const void *_data, uint32_t _size) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_make_ref", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Memory MakeRef(IntPtr data, uint size); | |
/// <summary> Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call doesn't allocate memory for data. It just copies the _data pointer. You can pass `ReleaseFn` function pointer to release this memory after it's consumed, otherwise you must make sure _data is available for at least 2 `bgfx::frame` calls. `ReleaseFn` function must be able to be called from any thread.</summary> | |
/// <param name="_data">[in] Pointer to data.</param> | |
/// <param name="_size">[in] Size of data.</param> | |
/// <param name="_releaseFn">[in] Callback function to release memory after use.</param> | |
/// <param name="_userData">[in] User data to be passed to callback function.</param> | |
/// <remarks> Data passed must be available for at least 2 `bgfx::frame` calls. | |
/// C99 equivalent are `bgfx_make_ref`, `bgfx_make_ref_release`.</remarks> | |
///---------- | |
///const bgfx_memory_t *bgfx_make_ref_release(const void *_data, uint32_t _size, bgfx_release_fn_t _releaseFn, void *_userData) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_make_ref_release", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern Memory MakeRef(IntPtr data, uint size, ReleaseFnDelegate releaseFn, IntPtr userData); | |
/// <summary> Override internal texture by creating new texture. Previously created internal texture will released.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_width">[in] Width.</param> | |
/// <param name="_height">[in] Height.</param> | |
/// <param name="_numMips">[in] Number of mip-maps.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <param name="_flags">[in] Default texture sampling mode is linear, and wrap mode is repeat. - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <returns> Native API pointer to texture. If result is 0, texture is not created yet from the main thread.</returns> | |
/// <remarks> It's expected you understand some bgfx internals before you use this call. | |
/// Must be called only on render thread. | |
/// C99 equivalent is `bgfx_override_internal_texture`.</remarks> | |
///---------- | |
///uintptr_t bgfx_override_internal_texture(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_override_internal_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern UIntPtr OverrideInternal(Texture handle, ushort width, ushort height, byte numMips, TextureFormat format, uint flags); | |
/// <summary> Override internal texture with externally created texture. Previously created internal texture will released.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_ptr">[in] Native API pointer to texture.</param> | |
/// <returns> Native API pointer to texture. If result is 0, texture is not created yet from the main thread.</returns> | |
/// <remarks> It's expected you understand some bgfx internals before you use this call. | |
/// Must be called only on render thread. | |
/// C99 equivalent is `bgfx_override_internal_texture_ptr`.</remarks> | |
///---------- | |
///uintptr_t bgfx_override_internal_texture_ptr(bgfx_texture_handle_t _handle, uintptr_t _ptr) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_override_internal_texture_ptr", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern UIntPtr OverrideInternal(Texture handle, UIntPtr ptr); | |
/// <summary> Read back texture content.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_data">[in] Destination buffer.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <returns> Frame number when the result will be available. See: `bgfx::frame`.</returns> | |
/// <remarks> Texture must be created with `BGFX_TEXTURE_READ_BACK` flag. | |
/// Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`. | |
/// C99 equivalent is `bgfx_read_texture`.</remarks> | |
///---------- | |
///uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void *_data, uint8_t _mip) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_read_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint ReadTexture(Texture handle, IntPtr data, byte mip); | |
/// <summary> Render frame.</summary> | |
/// <param name="_msecs">[in] Timeout in milliseconds.</param> | |
/// <returns> Current renderer state. See: `bgfx::RenderFrame`.</returns> | |
/// <remarks> `bgfx::renderFrame` is blocking call. It waits for `bgfx::frame` to be called from API thread to process frame. If timeout value is passed call will timeout and return even if `bgfx::frame` is not called. | |
/// This call should be only used on platforms that don't allow creating separate rendering thread. If it is called before to bgfx::init, render thread won't be created by bgfx::init call. | |
/// C99 equivalent is `bgfx_render_frame`.</remarks> | |
///---------- | |
///bgfx_render_frame_t bgfx_render_frame(int32_t _msecs) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_render_frame", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern RenderFrame RenderFrame(int msecs); | |
/// <summary> Request screen shot of window back buffer.</summary> | |
/// <param name="_handle">[in] Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be made for main window back buffer.</param> | |
/// <param name="_filePath">[in] Will be passed to `bgfx::CallbackI::screenShot` callback.</param> | |
/// <remarks> `bgfx::CallbackI::screenShot` must be implemented. | |
/// Frame buffer handle must be created with OS' target native window handle. | |
/// C99 equivalent is `bgfx_request_screen_shot`.</remarks> | |
///---------- | |
///void bgfx_request_screen_shot(bgfx_frame_buffer_handle_t _handle, const char *_filePath) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_request_screen_shot", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void RequestScreenShot(FrameBuffer handle, string filePath); | |
/// <summary> Reset graphic settings and back-buffer size.</summary> | |
/// <param name="_width">[in] Back-buffer width.</param> | |
/// <param name="_height">[in] Back-buffer height.</param> | |
/// <param name="_flags">[in] See: `BGFX_RESET_*` for more info. - `BGFX_RESET_NONE` - No reset flags. - `BGFX_RESET_FULLSCREEN` - Not supported yet. - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA. - `BGFX_RESET_VSYNC` - Enable V-Sync. - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy. - `BGFX_RESET_CAPTURE` - Begin screen capture. - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU. - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`. - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <remarks> This call doesn't actually change window size, it just resizes back-buffer. Windowing code has to change window size. | |
/// C99 equivalent is `bgfx_reset`.</remarks> | |
///---------- | |
///void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags, bgfx_texture_format_t _format) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_reset", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Reset(uint width, uint height, ResetFlags flags, TextureFormat format); | |
/// <summary> Reset all view settings to default.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <remarks> C99 equivalent is `bgfx_reset_view`.</remarks> | |
///---------- | |
///void bgfx_reset_view(bgfx_view_id_t _id) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_reset_view", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void ResetView(ViewId id); | |
/// <summary> Set compute dynamic index buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Dynamic index buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_compute_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_compute_dynamic_index_buffer( struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_compute_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(Encoder encoder, byte stage, DynamicIndexBuffer handle, BufferAccess access); | |
/// <summary> Set compute dynamic vertex buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Dynamic vertex buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_compute_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_compute_dynamic_vertex_buffer( struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_compute_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(Encoder encoder, byte stage, DynamicVertexBuffer handle, BufferAccess access); | |
/// <summary> Set compute index buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Index buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_compute_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_compute_index_buffer(struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_compute_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(Encoder encoder, byte stage, IndexBuffer handle, BufferAccess access); | |
/// <summary> Set compute indirect buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Indirect buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_compute_indirect_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_compute_indirect_buffer( struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_compute_indirect_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(Encoder encoder, byte stage, IndirectBuffer handle, BufferAccess access); | |
/// <summary> Set compute vertex buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Vertex buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_compute_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_compute_vertex_buffer(struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_compute_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(Encoder encoder, byte stage, VertexBuffer handle, BufferAccess access); | |
/// <summary> Set compute dynamic index buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Dynamic index buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_compute_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_compute_dynamic_index_buffer( uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_compute_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(byte stage, DynamicIndexBuffer handle, BufferAccess access); | |
/// <summary> Set compute dynamic vertex buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Dynamic vertex buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_compute_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_compute_dynamic_vertex_buffer( uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_compute_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(byte stage, DynamicVertexBuffer handle, BufferAccess access); | |
/// <summary> Set compute index buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Index buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_compute_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_compute_index_buffer(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_compute_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(byte stage, IndexBuffer handle, BufferAccess access); | |
/// <summary> Set compute indirect buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Indirect buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_compute_indirect_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_compute_indirect_buffer(uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_compute_indirect_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(byte stage, IndirectBuffer handle, BufferAccess access); | |
/// <summary> Set compute vertex buffer.</summary> | |
/// <param name="_stage">[in] Compute stage.</param> | |
/// <param name="_handle">[in] Vertex buffer handle.</param> | |
/// <param name="_access">[in] Buffer access. See `Access::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_compute_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_compute_vertex_buffer(uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_compute_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetBuffer(byte stage, VertexBuffer handle, BufferAccess access); | |
/// <summary> Set condition for rendering.</summary> | |
/// <param name="_handle">[in] Occlusion query handle.</param> | |
/// <param name="_visible">[in] Render if occlusion query is visible.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_condition`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_condition(struct bgfx_encoder_s *_encoder, bgfx_occlusion_query_handle_t _handle, bool _visible) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_condition", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetCondition(Encoder encoder, OcclusionQuery handle, bool visible); | |
/// <summary> Set condition for rendering.</summary> | |
/// <param name="_handle">[in] Occlusion query handle.</param> | |
/// <param name="_visible">[in] Render if occlusion query is visible.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_condition`.</remarks> | |
///---------- | |
///void bgfx_set_condition(bgfx_occlusion_query_handle_t _handle, bool _visible) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_condition", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetCondition(OcclusionQuery handle, bool visible); | |
/// <summary> Set debug flags.</summary> | |
/// <param name="_debug">[in] Available flags: - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set all rendering calls will be skipped. This is useful when profiling to quickly assess potential bottlenecks between CPU and GPU. - `BGFX_DEBUG_PROFILER` - Enable profiler. - `BGFX_DEBUG_STATS` - Display internal statistics. - `BGFX_DEBUG_TEXT` - Display debug text. - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering primitives will be rendered as lines.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_debug`.</remarks> | |
///---------- | |
///void bgfx_set_debug(uint32_t _debug) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_debug", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetDebug(DebugFlags debug); | |
/// <summary> Set compute image from texture.</summary> | |
/// <param name="_stage">[in] Texture unit.</param> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <param name="_access">[in] Texture access. See `Access::Enum`.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_image`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_image(struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_image", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetImage(Encoder encoder, byte stage, Texture handle, byte mip, BufferAccess access, TextureFormat format); | |
/// <summary> Set compute image from texture.</summary> | |
/// <param name="_stage">[in] Texture unit.</param> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <param name="_access">[in] Texture access. See `Access::Enum`.</param> | |
/// <param name="_format">[in] Texture format. See: `TextureFormat::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_image`.</remarks> | |
///---------- | |
///void bgfx_set_image(uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_image", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetImage(byte stage, Texture handle, byte mip, BufferAccess access, TextureFormat format); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Dynamic index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_dynamic_index_buffer( struct bgfx_encoder_s *_encoder, bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(Encoder encoder, DynamicIndexBuffer handle, uint firstIndex, uint numIndices); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_index_buffer(struct bgfx_encoder_s *_encoder, bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(Encoder encoder, IndexBuffer handle, uint firstIndex, uint numIndices); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_tib">[in] Transient index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_transient_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_transient_index_buffer( struct bgfx_encoder_s *_encoder, const bgfx_transient_index_buffer_t *_tib, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_transient_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(Encoder encoder, TransientIndexBuffer tib, uint firstIndex, uint numIndices); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Dynamic index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(DynamicIndexBuffer handle, uint firstIndex, uint numIndices); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_index_buffer(bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(IndexBuffer handle, uint firstIndex, uint numIndices); | |
/// <summary> Set index buffer for draw primitive.</summary> | |
/// <param name="_tib">[in] Transient index buffer.</param> | |
/// <param name="_firstIndex">[in] First index to render.</param> | |
/// <param name="_numIndices">[in] Number of indices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_transient_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_transient_index_buffer(const bgfx_transient_index_buffer_t *_tib, uint32_t _firstIndex, uint32_t _numIndices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_transient_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetIndexBuffer(TransientIndexBuffer tib, uint firstIndex, uint numIndices); | |
/// <summary> Set number of instances for auto generated instances use in conjuction with gl_InstanceID.</summary> | |
/// <param name="_numInstances">[in] Number of instances.</param> | |
/// <remarks> Availability depends on: `BGFX_CAPS_VERTEX_ID`. | |
/// C99 equivalent is `bgfx_set_instance_count`.</remarks> | |
///---------- | |
///void bgfx_set_instance_count(uint32_t _numInstances) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_instance_count", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceCount(uint numInstances); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_idb">[in] Transient instance data buffer.</param> | |
/// <param name="_start">[in] First instance data.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_instance_data_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_instance_data_buffer( struct bgfx_encoder_s *_encoder, const bgfx_instance_data_buffer_t *_idb, uint32_t _start, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_instance_data_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(Encoder encoder, InstanceDataBuffer idb, uint start, uint num); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer( struct bgfx_encoder_s *_encoder, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(Encoder encoder, DynamicVertexBuffer handle, uint startVertex, uint num); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_instance_data_from_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_instance_data_from_vertex_buffer( struct bgfx_encoder_s *_encoder, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_instance_data_from_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(Encoder encoder, VertexBuffer handle, uint startVertex, uint num); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_idb">[in] Transient instance data buffer.</param> | |
/// <param name="_start">[in] First instance data.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_instance_data_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_instance_data_buffer(const bgfx_instance_data_buffer_t *_idb, uint32_t _start, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_instance_data_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(InstanceDataBuffer idb, uint start, uint num); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_instance_data_from_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_instance_data_from_dynamic_vertex_buffer( bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_instance_data_from_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(DynamicVertexBuffer handle, uint startVertex, uint num); | |
/// <summary> Set instance data buffer for draw primitive.</summary> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_num">[in] Number of data instances.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_instance_data_from_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_instance_data_from_vertex_buffer( bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_instance_data_from_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetInstanceDataBuffer(VertexBuffer handle, uint startVertex, uint num); | |
/// <summary> Sets a debug marker. This allows you to group graphics calls together for easy browsing in graphics debugging tools.</summary> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_marker`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_marker(struct bgfx_encoder_s *_encoder, const char *_marker) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_marker", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetMarker(Encoder encoder, string marker); | |
/// <summary> Sets debug marker.</summary> | |
/// <remarks> C99 equivalent is `bgfx_set_marker`.</remarks> | |
///---------- | |
///void bgfx_set_marker(const char *_marker) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_marker", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetMarker(string marker); | |
/// <summary> Set frame buffer debug name.</summary> | |
/// <param name="_handle">[in] frame buffer handle.</param> | |
/// <param name="_name">[in] frame buffer name.</param> | |
/// <param name="_len">[in] frame buffer name length (if length is INT32_MAX, it's expected that _name is zero terminated string.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_frame_buffer_name`.</remarks> | |
///---------- | |
///void bgfx_set_frame_buffer_name(bgfx_frame_buffer_handle_t _handle, const char *_name, int32_t _len) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_frame_buffer_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetName(FrameBuffer handle, string name, int len); | |
/// <summary> Set static index buffer debug name.</summary> | |
/// <param name="_handle">[in] Static index buffer handle.</param> | |
/// <param name="_name">[in] Static index buffer name.</param> | |
/// <param name="_len">[in] Static index buffer name length (if length is INT32_MAX, it's expected that _name is zero terminated string.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_index_buffer_name`.</remarks> | |
///---------- | |
///void bgfx_set_index_buffer_name(bgfx_index_buffer_handle_t _handle, const char *_name, int32_t _len) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_index_buffer_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetName(IndexBuffer handle, string name, int len); | |
/// <summary> Set shader debug name.</summary> | |
/// <param name="_handle">[in] Shader handle.</param> | |
/// <param name="_name">[in] Shader name.</param> | |
/// <param name="_len">[in] Shader name length (if length is INT32_MAX, it's expected that _name is zero terminated string.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_shader_name`.</remarks> | |
///---------- | |
///void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const char *_name, int32_t _len) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_shader_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetName(Shader handle, string name, int len); | |
/// <summary> Set texture debug name.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_name">[in] Texture name.</param> | |
/// <param name="_len">[in] Texture name length (if length is INT32_MAX, it's expected that _name is zero terminated string.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_texture_name`.</remarks> | |
///---------- | |
///void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const char *_name, int32_t _len) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_texture_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetName(Texture handle, string name, int len); | |
/// <summary> Set static vertex buffer debug name.</summary> | |
/// <param name="_handle">[in] Static vertex buffer handle.</param> | |
/// <param name="_name">[in] Static vertex buffer name.</param> | |
/// <param name="_len">[in] Static vertex buffer name length (if length is INT32_MAX, it's expected that _name is zero terminated string.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_vertex_buffer_name`.</remarks> | |
///---------- | |
///void bgfx_set_vertex_buffer_name(bgfx_vertex_buffer_handle_t _handle, const char *_name, int32_t _len) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_vertex_buffer_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetName(VertexBuffer handle, string name, int len); | |
/// <summary> Set palette color value.</summary> | |
/// <param name="_index">[in] Index into palette.</param> | |
/// <param name="_rgba">[in] RGBA floating point value.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_palette_color`.</remarks> | |
///---------- | |
///void bgfx_set_palette_color(uint8_t _index, const float _rgba[4]) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_palette_color", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetPaletteColor(byte index, in Vector4 rgba); | |
/// <summary> Set platform data.</summary> | |
/// <remarks> Must be called before `bgfx::init`. | |
/// C99 equivalent is `bgfx_set_platform_data`.</remarks> | |
///---------- | |
///void bgfx_set_platform_data(const bgfx_platform_data_t *_data) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_platform_data", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetPlatformData(PlatformData* data); | |
/// <summary> Set scissor for draw primitive. To scissor for all primitives in view see `bgfx::setViewScissor`.</summary> | |
/// <param name="_x">[in] Position x from the left side of the window.</param> | |
/// <param name="_y">[in] Position y from the top of the window.</param> | |
/// <param name="_width">[in] Width of scissor region.</param> | |
/// <param name="_height">[in] Height of scissor region.</param> | |
/// <returns> Scissor cache index.</returns> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_scissor`.</remarks> | |
///---------- | |
///uint16_t bgfx_encoder_set_scissor(struct bgfx_encoder_s *_encoder, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_scissor", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ushort SetScissor(Encoder encoder, ushort x, ushort y, ushort width, ushort height); | |
/// <summary> Set scissor from cache for draw primitive.</summary> | |
/// <param name="_cache">[in] Index in scissor cache. Pass UINT16_MAX to have primitive use view scissor instead.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_scissor_cached`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_scissor_cached(struct bgfx_encoder_s *_encoder, uint16_t _cache) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_scissor_cached", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetScissor(Encoder encoder, ushort cache); | |
/// <summary> Set scissor for draw primitive. For scissor for all primitives in view see `bgfx::setViewScissor`.</summary> | |
/// <param name="_x">[in] Position x from the left corner of the window.</param> | |
/// <param name="_y">[in] Position y from the top corner of the window.</param> | |
/// <param name="_width">[in] Width of scissor region.</param> | |
/// <param name="_height">[in] Height of scissor region.</param> | |
/// <returns> Scissor cache index.</returns> | |
/// <remarks> C99 equivalent is `bgfx_set_scissor`.</remarks> | |
///---------- | |
///uint16_t bgfx_set_scissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_scissor", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ushort SetScissor(ushort x, ushort y, ushort width, ushort height); | |
/// <summary> Set scissor from cache for draw primitive.</summary> | |
/// <param name="_cache">[in] Index in scissor cache. Passing UINT16_MAX unset primitive scissor and primitive will use view scissor instead.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_scissor_cached`.</remarks> | |
///---------- | |
///void bgfx_set_scissor_cached(uint16_t _cache) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_scissor_cached", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetScissor(ushort cache); | |
/// <summary> Set render states for draw primitive.</summary> | |
/// <param name="_state">[in] State flags. Default state for primitive type is triangles. See: `BGFX_STATE_DEFAULT`. - `BGFX_STATE_DEPTH_TEST_*` - Depth test function. - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC. - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2. - `BGFX_STATE_CULL_*` - Backface culling mode. - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write. - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing. - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.</param> | |
/// <param name="_rgba">[in] Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and `BGFX_STATE_BLEND_INV_FACTOR` blend modes.</param> | |
/// <remarks> 1. To setup more complex states use: `BGFX_STATE_ALPHA_REF(_ref)`, `BGFX_STATE_POINT_SIZE(_size)`, `BGFX_STATE_BLEND_FUNC(_src, _dst)`, `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`, `BGFX_STATE_BLEND_EQUATION(_equation)`, `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)` 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend equation is specified. | |
/// C99 equivalent is `bgfx_encoder_set_state`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_state(struct bgfx_encoder_s *_encoder, uint64_t _state, uint32_t _rgba) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_state", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetState(Encoder encoder, StateFlags state, uint rgba); | |
/// <summary> Set render states for draw primitive.</summary> | |
/// <param name="_state">[in] State flags. Default state for primitive type is triangles. See: `BGFX_STATE_DEFAULT`. - `BGFX_STATE_DEPTH_TEST_*` - Depth test function. - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC. - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2. - `BGFX_STATE_CULL_*` - Backface culling mode. - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write. - `BGFX_STATE_MSAA` - Enable MSAA. - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.</param> | |
/// <param name="_rgba">[in] Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and `BGFX_STATE_BLEND_INV_FACTOR` blend modes.</param> | |
/// <remarks> 1. To setup more complex states use: `BGFX_STATE_ALPHA_REF(_ref)`, `BGFX_STATE_POINT_SIZE(_size)`, `BGFX_STATE_BLEND_FUNC(_src, _dst)`, `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)` `BGFX_STATE_BLEND_EQUATION(_equation)` `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)` 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend equation is specified. | |
/// C99 equivalent is `bgfx_set_state`.</remarks> | |
///---------- | |
///void bgfx_set_state(uint64_t _state, uint32_t _rgba) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_state", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetState(StateFlags state, uint rgba); | |
/// <summary> Set stencil test state.</summary> | |
/// <param name="_fstencil">[in] Front stencil state.</param> | |
/// <param name="_bstencil">[in] Back stencil state. If back is set to `BGFX_STENCIL_NONE` _fstencil is applied to both front and back facing primitives.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_stencil`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_stencil(struct bgfx_encoder_s *_encoder, uint32_t _fstencil, uint32_t _bstencil) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_stencil", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetStencil(Encoder encoder, StencilFlags fstencil, StencilFlags bstencil); | |
/// <summary> Set stencil test state.</summary> | |
/// <param name="_fstencil">[in] Front stencil state.</param> | |
/// <param name="_bstencil">[in] Back stencil state. If back is set to `BGFX_STENCIL_NONE` _fstencil is applied to both front and back facing primitives.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_stencil`.</remarks> | |
///---------- | |
///void bgfx_set_stencil(uint32_t _fstencil, uint32_t _bstencil) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_stencil", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetStencil(StencilFlags fstencil, StencilFlags bstencil); | |
/// <summary> Set texture stage for draw primitive.</summary> | |
/// <param name="_stage">[in] Texture unit.</param> | |
/// <param name="_sampler">[in] Program sampler.</param> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_flags">[in] Texture sampling mode. Default value UINT32_MAX uses texture sampling settings from the texture. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_texture`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_texture(struct bgfx_encoder_s *_encoder, uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetTexture(Encoder encoder, byte stage, Uniform sampler, Texture handle, SamplerFlags flags); | |
/// <summary> Set texture stage for draw primitive.</summary> | |
/// <param name="_stage">[in] Texture unit.</param> | |
/// <param name="_sampler">[in] Program sampler.</param> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_flags">[in] Texture sampling mode. Default value UINT32_MAX uses texture sampling settings from the texture. - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap mode. - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic sampling.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_texture`.</remarks> | |
///---------- | |
///void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_texture", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetTexture(byte stage, Uniform sampler, Texture handle, SamplerFlags flags); | |
/// <summary> Set model matrix for draw primitive. If it is not called, model will be rendered with identity model matrix.</summary> | |
/// <param name="_mtx">[in] Pointer to first matrix in array.</param> | |
/// <param name="_num">[in] Number of matrices in array.</param> | |
/// <returns> Index into matrix cache in case the same model matrix has to be used for other draw primitive call.</returns> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_transform`.</remarks> | |
///---------- | |
///uint32_t bgfx_encoder_set_transform(struct bgfx_encoder_s *_encoder, const void *_mtx, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_transform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint SetTransform(Encoder encoder, IntPtr mtx, ushort num); | |
/// <summary> Set model matrix from matrix cache for draw primitive.</summary> | |
/// <param name="_cache">[in] Index in matrix cache.</param> | |
/// <param name="_num">[in] Number of matrices from cache.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_transform_cached`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_transform_cached(struct bgfx_encoder_s *_encoder, uint32_t _cache, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_transform_cached", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetTransform(Encoder encoder, uint cache, ushort num); | |
/// <summary> Set model matrix for draw primitive. If it is not called, the model will be rendered with an identity model matrix.</summary> | |
/// <param name="_mtx">[in] Pointer to first matrix in array.</param> | |
/// <param name="_num">[in] Number of matrices in array.</param> | |
/// <returns> index into matrix cache in case the same model matrix has to be used for other draw primitive call.</returns> | |
/// <remarks> C99 equivalent is `bgfx_set_transform`.</remarks> | |
///---------- | |
///uint32_t bgfx_set_transform(const void *_mtx, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_transform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint SetTransform(IntPtr mtx, ushort num); | |
/// <summary> Set model matrix from matrix cache for draw primitive.</summary> | |
/// <param name="_cache">[in] Index in matrix cache.</param> | |
/// <param name="_num">[in] Number of matrices from cache.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_transform_cached`.</remarks> | |
///---------- | |
///void bgfx_set_transform_cached(uint32_t _cache, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_transform_cached", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetTransform(uint cache, ushort num); | |
/// <summary> Set shader uniform parameter for draw primitive.</summary> | |
/// <param name="_handle">[in] Uniform.</param> | |
/// <param name="_value">[in] Pointer to uniform data.</param> | |
/// <param name="_num">[in] Number of elements. Passing `UINT16_MAX` will use the _num passed on uniform creation.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_uniform`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_uniform(struct bgfx_encoder_s *_encoder, bgfx_uniform_handle_t _handle, const void *_value, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_uniform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetUniform(Encoder encoder, Uniform handle, IntPtr @value, ushort num); | |
/// <summary> Set shader uniform parameter for draw primitive.</summary> | |
/// <param name="_handle">[in] Uniform.</param> | |
/// <param name="_value">[in] Pointer to uniform data.</param> | |
/// <param name="_num">[in] Number of elements. Passing `UINT16_MAX` will use the _num passed on uniform creation.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_uniform`.</remarks> | |
///---------- | |
///void bgfx_set_uniform(bgfx_uniform_handle_t _handle, const void *_value, uint16_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_uniform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetUniform(Uniform handle, IntPtr @value, ushort num); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_handle">[in] Dynamic vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_dynamic_vertex_buffer( struct bgfx_encoder_s *_encoder, uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(Encoder encoder, byte stream, DynamicVertexBuffer handle, uint startVertex, uint numVertices); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_tvb">[in] Transient vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_transient_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_transient_vertex_buffer( struct bgfx_encoder_s *_encoder, uint8_t _stream, const bgfx_transient_vertex_buffer_t *_tvb, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_transient_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(Encoder encoder, byte stream, TransientVertexBuffer tvb, uint startVertex, uint numVertices); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_set_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_vertex_buffer(struct bgfx_encoder_s *_encoder, uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(Encoder encoder, byte stream, VertexBuffer handle, uint startVertex, uint numVertices); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_handle">[in] Dynamic vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(byte stream, DynamicVertexBuffer handle, uint startVertex, uint numVertices); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_tvb">[in] Transient vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_transient_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_transient_vertex_buffer( uint8_t _stream, const bgfx_transient_vertex_buffer_t *_tvb, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_transient_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(byte stream, TransientVertexBuffer tvb, uint startVertex, uint numVertices); | |
/// <summary> Set vertex buffer for draw primitive.</summary> | |
/// <param name="_stream">[in] Vertex stream.</param> | |
/// <param name="_handle">[in] Vertex buffer.</param> | |
/// <param name="_startVertex">[in] First vertex to render.</param> | |
/// <param name="_numVertices">[in] Number of vertices to render.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexBuffer(byte stream, VertexBuffer handle, uint startVertex, uint numVertices); | |
/// <summary> Set number of vertices for auto generated vertices use in conjuction with gl_VertexID.</summary> | |
/// <param name="_numVertices">[in] Number of vertices.</param> | |
/// <remarks> Availability depends on: `BGFX_CAPS_VERTEX_ID`. | |
/// C99 equivalent is `bgfx_encoder_set_vertex_count`.</remarks> | |
///---------- | |
///void bgfx_encoder_set_vertex_count(struct bgfx_encoder_s *_encoder, uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_set_vertex_count", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexCount(Encoder encoder, uint numVertices); | |
/// <summary> Set number of vertices for auto generated vertices use in conjuction with gl_VertexID.</summary> | |
/// <param name="_numVertices">[in] Number of vertices.</param> | |
/// <remarks> Availability depends on: `BGFX_CAPS_VERTEX_ID`. | |
/// C99 equivalent is `bgfx_set_vertex_count`.</remarks> | |
///---------- | |
///void bgfx_set_vertex_count(uint32_t _numVertices) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_vertex_count", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetVertexCount(uint numVertices); | |
/// <summary> Set view clear flags.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_flags">[in] Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear operation. See: `BGFX_CLEAR_*`.</param> | |
/// <param name="_rgba">[in] Color clear value.</param> | |
/// <param name="_depth">[in] Depth clear value.</param> | |
/// <param name="_stencil">[in] Stencil clear value.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_clear`.</remarks> | |
///---------- | |
///void bgfx_set_view_clear(bgfx_view_id_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_clear", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewClear(ViewId id, ClearFlags flags, uint rgba, float depth, byte stencil); | |
/// <summary> Set view clear flags with different clear color for each frame buffer texture. Must use setClearColor to setup clear color palette.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_flags">[in] Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear operation. See: `BGFX_CLEAR_*`.</param> | |
/// <param name="_depth">[in] Depth clear value.</param> | |
/// <param name="_stencil">[in] Stencil clear value.</param> | |
/// <param name="_0">[in] Palette index for frame buffer attachment 0.</param> | |
/// <param name="_1">[in] Palette index for frame buffer attachment 1.</param> | |
/// <param name="_2">[in] Palette index for frame buffer attachment 2.</param> | |
/// <param name="_3">[in] Palette index for frame buffer attachment 3.</param> | |
/// <param name="_4">[in] Palette index for frame buffer attachment 4.</param> | |
/// <param name="_5">[in] Palette index for frame buffer attachment 5.</param> | |
/// <param name="_6">[in] Palette index for frame buffer attachment 6.</param> | |
/// <param name="_7">[in] Palette index for frame buffer attachment 7.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_clear_mrt`.</remarks> | |
///---------- | |
///void bgfx_set_view_clear_mrt(bgfx_view_id_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_clear_mrt", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewClear(ViewId id, ushort flags, float depth, byte stencil, byte _0, byte _1, byte _2, byte _3, byte _4, byte _5, byte _6, byte _7); | |
/// <summary> Set view frame buffer.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_handle">[in] Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as frame buffer handle will draw primitives from this view into default back buffer.</param> | |
/// <remarks> Not persistent after `bgfx::reset` call. | |
/// C99 equivalent is `bgfx_set_view_frame_buffer`.</remarks> | |
///---------- | |
///void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_frame_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewFrameBuffer(ViewId id, FrameBuffer handle); | |
/// <summary> Set view sorting mode.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_mode">[in] View sort mode. See `ViewMode::Enum`.</param> | |
/// <remarks> View mode must be set prior calling `bgfx::submit` for the view. | |
/// C99 equivalent is `bgfx_set_view_mode`.</remarks> | |
///---------- | |
///void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_mode", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewMode(ViewId id, ViewMode mode); | |
/// <summary> Set view name.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_name">[in] View name.</param> | |
/// <remarks> This is debug only feature. | |
/// In graphics debugger view name will appear as: | |
/// "nnnce <view name>" ^ ^^ ^ | |+-- eye (L/R) | +--- compute (C) +------ view id | |
/// C99 equivalent is `bgfx_set_view_name`.</remarks> | |
///---------- | |
///void bgfx_set_view_name(bgfx_view_id_t _id, const char *_name) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_name", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewName(ViewId id, string name); | |
/// <summary> Post submit view reordering.</summary> | |
/// <param name="_id">[in] First view id.</param> | |
/// <param name="_num">[in] Number of views to remap.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_order`.</remarks> | |
///---------- | |
///void bgfx_set_view_order(bgfx_view_id_t _id, uint16_t _num, const bgfx_view_id_t *_order) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_order", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewOrder(ViewId id, ushort num, ViewId* order); | |
/// <summary> Set view rectangle. Draw primitive outside view will be clipped.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_x">[in] Position x from the left corner of the window.</param> | |
/// <param name="_y">[in] Position y from the top corner of the window.</param> | |
/// <param name="_width">[in] Width of view port region.</param> | |
/// <param name="_height">[in] Height of view port region.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_rect`.</remarks> | |
///---------- | |
///void bgfx_set_view_rect(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_rect", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewRect(ViewId id, ushort x, ushort y, ushort width, ushort height); | |
/// <summary> Set view rectangle. Draw primitive outside view will be clipped.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_x">[in] Position x from the left corner of the window.</param> | |
/// <param name="_y">[in] Position y from the top corner of the window.</param> | |
/// <param name="_ratio">[in] Width and height will be set in respect to back-buffer size. See: `BackbufferRatio::Enum`.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_rect_auto`.</remarks> | |
///---------- | |
///void bgfx_set_view_rect_auto(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, bgfx_backbuffer_ratio_t _ratio) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_rect_auto", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewRect(ViewId id, ushort x, ushort y, BackbufferRatio ratio); | |
/// <summary> Set view scissor. Draw primitive outside view will be clipped. When _x, _y, _width and _height are set to 0, scissor will be disabled.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_x">[in] Position x from the left corner of the window.</param> | |
/// <param name="_y">[in] Position y from the top corner of the window.</param> | |
/// <param name="_width">[in] Width of scissor region.</param> | |
/// <param name="_height">[in] Height of scissor region.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_scissor`.</remarks> | |
///---------- | |
///void bgfx_set_view_scissor(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_scissor", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewScissor(ViewId id, ushort x, ushort y, ushort width, ushort height); | |
/// <summary> Set view view and projection matrices, all draw primitives in this view will use these matrices.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_view">[in] View matrix.</param> | |
/// <param name="_proj">[in] Projection matrix.</param> | |
/// <remarks> C99 equivalent is `bgfx_set_view_transform`.</remarks> | |
///---------- | |
///void bgfx_set_view_transform(bgfx_view_id_t _id, const void *_view, const void *_proj) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_set_view_transform", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void SetViewTransform(ViewId id, in Matrix4x4 view, in Matrix4x4 proj); | |
/// <summary> Shutdown bgfx library.</summary> | |
/// <remarks> C99 equivalent is `bgfx_shutdown`.</remarks> | |
///---------- | |
///void bgfx_shutdown() | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_shutdown", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Shutdown(); | |
/// <summary> Skip _num bytes in vertex stream.</summary> | |
/// <remarks> C99 equivalent is `bgfx_vertex_decl_skip`.</remarks> | |
///---------- | |
///void bgfx_vertex_decl_skip(bgfx_vertex_decl_t *_decl, uint8_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_decl_skip", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Skip(VertexDecl decl, byte num); | |
/// <summary> Submit primitive for rendering.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_submit`.</remarks> | |
///---------- | |
///void bgfx_encoder_submit(struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_submit", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(Encoder encoder, ViewId id, ShaderProgram handle, uint depth, bool preserveState); | |
/// <summary> Submit primitive for rendering with index and instance data info from indirect buffer.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_indirectHandle">[in] Indirect buffer.</param> | |
/// <param name="_start">[in] First element in indirect buffer.</param> | |
/// <param name="_num">[in] Number of dispatches.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_submit_indirect`.</remarks> | |
///---------- | |
///void bgfx_encoder_submit_indirect(struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_submit_indirect", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(Encoder encoder, ViewId id, ShaderProgram handle, IndirectBuffer indirectHandle, ushort start, ushort num, uint depth, bool preserveState); | |
/// <summary> Submit primitive with occlusion query for rendering.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_program">[in] Program.</param> | |
/// <param name="_occlusionQuery">[in] Occlusion query.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_encoder_submit_occlusion_query`.</remarks> | |
///---------- | |
///void bgfx_encoder_submit_occlusion_query( struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_submit_occlusion_query", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(Encoder encoder, ViewId id, ShaderProgram program, OcclusionQuery occlusionQuery, uint depth, bool preserveState); | |
/// <summary> Submit primitive for rendering.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_submit`.</remarks> | |
///---------- | |
///void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_submit", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(ViewId id, ShaderProgram handle, uint depth, bool preserveState); | |
/// <summary> Submit primitive for rendering with index and instance data info from indirect buffer.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_indirectHandle">[in] Indirect buffer.</param> | |
/// <param name="_start">[in] First element in indirect buffer.</param> | |
/// <param name="_num">[in] Number of dispatches.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_submit_indirect`.</remarks> | |
///---------- | |
///void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_submit_indirect", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(ViewId id, ShaderProgram handle, IndirectBuffer indirectHandle, ushort start, ushort num, uint depth, bool preserveState); | |
/// <summary> Submit primitive with occlusion query for rendering.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <param name="_program">[in] Program.</param> | |
/// <param name="_occlusionQuery">[in] Occlusion query.</param> | |
/// <param name="_depth">[in] Depth for sorting.</param> | |
/// <param name="_preserveState">[in] Preserve internal draw state for next draw call submit.</param> | |
/// <remarks> C99 equivalent is `bgfx_submit_occlusion_query`.</remarks> | |
///---------- | |
///void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, bool _preserveState) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_submit_occlusion_query", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Submit(ViewId id, ShaderProgram program, OcclusionQuery occlusionQuery, uint depth, bool preserveState); | |
/// <summary> Convert index buffer for use with different primitive topologies.</summary> | |
/// <param name="_conversion">[in] Conversion type, see `TopologyConvert::Enum`.</param> | |
/// <param name="_dst">[in] Destination index buffer. If this argument is NULL function will return number of indices after conversion.</param> | |
/// <param name="_dstSize">[in] Destination index buffer in bytes. It must be large enough to contain output indices. If destination size is insufficient index buffer will be truncated.</param> | |
/// <param name="_indices">[in] Source indices.</param> | |
/// <param name="_numIndices">[in] Number of input indices.</param> | |
/// <param name="_index32">[in] Set to `true` if input indices are 32-bit.</param> | |
/// <returns> Number of output indices after conversion.</returns> | |
/// <remarks> C99 equivalent is `bgfx_topology_convert`.</remarks> | |
///---------- | |
///uint32_t bgfx_topology_convert(bgfx_topology_convert_t _conversion, void *_dst, uint32_t _dstSize, const void *_indices, uint32_t _numIndices, bool _index32) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_topology_convert", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern uint TopologyConvert(TopologyConvert conversion, IntPtr dst, uint dstSize, IntPtr indices, uint numIndices, bool index32); | |
/// <summary> Sort indices.</summary> | |
/// <param name="_sort">[in] Sort order, see `TopologySort::Enum`.</param> | |
/// <param name="_dst">[in] Destination index buffer.</param> | |
/// <param name="_dstSize">[in] Destination index buffer in bytes. It must be large enough to contain output indices. If destination size is insufficient index buffer will be truncated.</param> | |
/// <param name="_dir">[in] Direction (vector must be normalized).</param> | |
/// <param name="_pos">[in] Position.</param> | |
/// <param name="_vertices">[in] Pointer to first vertex represented as float x, y, z. Must contain at least number of vertices referencende by index buffer.</param> | |
/// <param name="_stride">[in] Vertex stride.</param> | |
/// <param name="_indices">[in] Source indices.</param> | |
/// <param name="_numIndices">[in] Number of input indices.</param> | |
/// <param name="_index32">[in] Set to `true` if input indices are 32-bit.</param> | |
/// <remarks> C99 equivalent is `bgfx_topology_sort_tri_list`.</remarks> | |
///---------- | |
///void bgfx_topology_sort_tri_list(bgfx_topology_sort_t _sort, void *_dst, uint32_t _dstSize, const float _dir[3], const float _pos[3], const void *_vertices, uint32_t _stride, const void *_indices, uint32_t _numIndices, bool _index32) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_topology_sort_tri_list", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void TopologySortTriList(TopologySort sort, IntPtr dst, uint dstSize, in Vector3 dir, in Vector3 pos, IntPtr vertices, uint stride, IntPtr indices, uint numIndices, bool index32); | |
/// <summary> Submit an empty primitive for rendering. Uniforms and draw state will be applied but no geometry will be submitted.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <remarks> These empty draw calls will sort before ordinary draw calls. | |
/// C99 equivalent is `bgfx_encoder_touch`.</remarks> | |
///---------- | |
///void bgfx_encoder_touch(struct bgfx_encoder_s *_encoder, bgfx_view_id_t _id) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_encoder_touch", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Touch(Encoder encoder, ViewId id); | |
/// <summary> Submit an empty primitive for rendering. Uniforms and draw state will be applied but no geometry will be submitted.</summary> | |
/// <param name="_id">[in] View id.</param> | |
/// <remarks> These empty draw calls will sort before ordinary draw calls. | |
/// C99 equivalent is `bgfx_touch`.</remarks> | |
///---------- | |
///void bgfx_touch(bgfx_view_id_t _id) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_touch", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Touch(ViewId id); | |
/// <summary> Update dynamic index buffer.</summary> | |
/// <param name="_handle">[in] Dynamic index buffer handle.</param> | |
/// <param name="_startIndex">[in] Start index.</param> | |
/// <param name="_mem">[in] Index buffer data.</param> | |
/// <remarks> C99 equivalent is `bgfx_update_dynamic_index_buffer`.</remarks> | |
///---------- | |
///void bgfx_update_dynamic_index_buffer( bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _startIndex, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_update_dynamic_index_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Update(DynamicIndexBuffer handle, uint startIndex, Memory mem); | |
/// <summary> Update dynamic vertex buffer.</summary> | |
/// <param name="_handle">[in] Dynamic vertex buffer handle.</param> | |
/// <param name="_startVertex">[in] Start vertex.</param> | |
/// <param name="_mem">[in] Vertex buffer data.</param> | |
/// <remarks> C99 equivalent is `bgfx_update_dynamic_vertex_buffer`.</remarks> | |
///---------- | |
///void bgfx_update_dynamic_vertex_buffer( bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_update_dynamic_vertex_buffer", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void Update(DynamicVertexBuffer handle, uint startVertex, Memory mem); | |
/// <summary> Update 2D texture.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_layer">[in] Layers in texture array.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <param name="_x">[in] X offset in texture.</param> | |
/// <param name="_y">[in] Y offset in texture.</param> | |
/// <param name="_width">[in] Width of texture block.</param> | |
/// <param name="_height">[in] Height of texture block.</param> | |
/// <param name="_mem">[in] Texture update data.</param> | |
/// <param name="_pitch">[in] Pitch of input image (bytes). When _pitch is set to UINT16_MAX, it will be calculated internally based on _width.</param> | |
/// <remarks> C99 equivalent is `bgfx_update_texture_2d`.</remarks> | |
///---------- | |
///void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t *_mem, uint16_t _pitch) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_update_texture_2d", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void UpdateTexture2D(Texture handle, ushort layer, byte mip, ushort x, ushort y, ushort width, ushort height, Memory mem, ushort pitch); | |
/// <summary> Update 3D texture.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <param name="_x">[in] X offset in texture.</param> | |
/// <param name="_y">[in] Y offset in texture.</param> | |
/// <param name="_z">[in] Z offset in texture.</param> | |
/// <param name="_width">[in] Width of texture block.</param> | |
/// <param name="_height">[in] Height of texture block.</param> | |
/// <param name="_depth">[in] Depth of texture block.</param> | |
/// <param name="_mem">[in] Texture update data.</param> | |
/// <remarks> C99 equivalent is `bgfx_update_texture_3d`.</remarks> | |
///---------- | |
///void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t *_mem) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_update_texture_3d", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void UpdateTexture3D(Texture handle, byte mip, ushort x, ushort y, ushort z, ushort width, ushort height, ushort depth, Memory mem); | |
/// <summary> Update Cube texture.</summary> | |
/// <param name="_handle">[in] Texture handle.</param> | |
/// <param name="_layer">[in] Layers in texture array.</param> | |
/// <param name="_side">[in] Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`, where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.</param> | |
/// <param name="_mip">[in] Mip level.</param> | |
/// <param name="_x">[in] X offset in texture.</param> | |
/// <param name="_y">[in] Y offset in texture.</param> | |
/// <param name="_width">[in] Width of texture block.</param> | |
/// <param name="_height">[in] Height of texture block.</param> | |
/// <param name="_mem">[in] Texture update data.</param> | |
/// <param name="_pitch">[in] Pitch of input image (bytes). When _pitch is set to UINT16_MAX, it will be calculated internally based on _width.</param> | |
/// <remarks> +----------+ |-z 2| | ^ +y | | | | Unfolded cube: | +---->+x | +----------+----------+----------+----------+ |+y 1|+y 4|+y 0|+y 5| | ^ -x | ^ +z | ^ +x | ^ -z | | | | | | | | | | | +---->+z | +---->+x | +---->-z | +---->-x | +----------+----------+----------+----------+ |+z 3| | ^ -y | | | | | +---->+x | +----------+ | |
/// C99 equivalent is `bgfx_update_texture_cube`.</remarks> | |
///---------- | |
///void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t *_mem, uint16_t _pitch) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_update_texture_cube", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void UpdateTextureCube(Texture handle, ushort layer, byte side, byte mip, ushort x, ushort y, ushort width, ushort height, Memory mem, ushort pitch); | |
/// <summary> Converts vertex stream data from one vertex stream format to another.</summary> | |
/// <param name="_destDecl">[in] Destination vertex stream declaration.</param> | |
/// <param name="_destData">[in] Destination vertex stream.</param> | |
/// <param name="_srcDecl">[in] Source vertex stream declaration.</param> | |
/// <param name="_srcData">[in] Source vertex stream data.</param> | |
/// <param name="_num">[in] Number of vertices to convert from source to destination.</param> | |
/// <remarks> C99 equivalent is `bgfx_vertex_convert`.</remarks> | |
///---------- | |
///void bgfx_vertex_convert(const bgfx_vertex_decl_t *_destDecl, void *_destData, const bgfx_vertex_decl_t *_srcDecl, const void *_srcData, uint32_t _num) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_convert", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void VertexConvert(VertexDecl destDecl, IntPtr destData, VertexDecl srcDecl, IntPtr srcData, uint num); | |
/// <summary> Pack vertex attribute into vertex stream format.</summary> | |
/// <param name="_input">[in] Value to be packed into vertex stream.</param> | |
/// <param name="_inputNormalized">[in] True if input value is already normalized.</param> | |
/// <param name="_attr">[in] Attribute to pack.</param> | |
/// <param name="_decl">[in] Vertex stream declaration.</param> | |
/// <param name="_data">[in] Destination vertex stream where data will be packed.</param> | |
/// <param name="_index">[in] Vertex index that will be modified.</param> | |
/// <remarks> C99 equivalent is `bgfx_vertex_pack`.</remarks> | |
///---------- | |
///void bgfx_vertex_pack(const float _input[4], bool _inputNormalized, bgfx_attrib_t _attr, const bgfx_vertex_decl_t *_decl, void *_data, uint32_t _index) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_pack", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void VertexPack(in Vector4 input, bool inputNormalized, VertexAttribute attr, VertexDecl decl, IntPtr data, uint index); | |
/// <summary> Unpack vertex attribute from vertex stream format.</summary> | |
/// <param name="_output">[out] Result of unpacking.</param> | |
/// <param name="_attr">[in] Attribute to unpack.</param> | |
/// <param name="_decl">[in] Vertex stream declaration.</param> | |
/// <param name="_data">[in] Source vertex stream from where data will be unpacked.</param> | |
/// <param name="_index">[in] Vertex index that will be unpacked.</param> | |
/// <remarks> C99 equivalent is `bgfx_vertex_unpack`.</remarks> | |
///---------- | |
///void bgfx_vertex_unpack(float _output[4], bgfx_attrib_t _attr, const bgfx_vertex_decl_t *_decl, const void *_data, uint32_t _index) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_vertex_unpack", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern void VertexUnpack(out Vector4 output, VertexAttribute attr, VertexDecl decl, IntPtr data, uint index); | |
/// <summary> Weld vertices.</summary> | |
/// <param name="_output">[in] Welded vertices remapping table. The size of buffer must be the same as number of vertices.</param> | |
/// <param name="_decl">[in] Vertex stream declaration.</param> | |
/// <param name="_data">[in] Vertex stream.</param> | |
/// <param name="_num">[in] Number of vertices in vertex stream.</param> | |
/// <param name="_epsilon">[in] Error tolerance for vertex position comparison.</param> | |
/// <returns> Number of unique vertices after vertex welding.</returns> | |
/// <remarks> C99 equivalent is `bgfx_weld_vertices`.</remarks> | |
///---------- | |
///uint16_t bgfx_weld_vertices(uint16_t *_output, const bgfx_vertex_decl_t *_decl, const void *_data, uint16_t _num, float _epsilon) | |
[DllImport(DllNames.BGFX, EntryPoint = "bgfx_weld_vertices", CallingConvention=CallingConvention.Cdecl)] | |
public static unsafe extern ushort WeldVertices(out ushort output, VertexDecl decl, IntPtr data, ushort num, float epsilon); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment