Skip to content

Instantly share code, notes, and snippets.

@raizam
raizam / slimBgfx.cs
Last active September 19, 2018 23:58
using System;
using System.Runtime.InteropServices;
public unsafe partial struct bgfx_vertex_decl_t
{
public uint hash;
public ushort stride;
internal fixed ushort offset[18];
internal fixed ushort attributes[18];
}
using System;
using System.Runtime.InteropServices;
using static LowSharp;
using System.Numerics;
namespace LibBgfx
{
[Flags]
public enum ResetFlags : long
{
namespace CXApi;
enum CppPrimitiveKind : ushort
{
Unknown = 0, Void, Ptr, Bool,
Char, WideChar, SChar,
UInt16, UInt32, UInt64,
Int16, Int32, Int64,
Float32, Float64
@raizam
raizam / slent.sql
Last active October 5, 2022 12:53
a port of the famous lent ECS library
--this is Imperial Royal Guard guarding this table
-- | __
-- | /__\
-- | X~~|
-- |-\|//-.
-- /|`.|'.' \
--|,|.\~~ /||
--|:|| ';||
--|||| | ||
using System;
using System.Runtime.InteropServices;
namespace LibGlfw
{
public enum Keys
{
KeyUnknown = -1,
KeySpace = 32,
KeyApostrophe = 39,
public unsafe partial struct Capabilities : IDisposable
{
//bgfx_caps_t
private Capabilities(Data* ptr)
{
this.ptr = ptr;
}
public static Capabilities New(Data val = default)
{
using System;
using System.Runtime.InteropServices;
using static LowSharp;
namespace LibVulkan
{
//VkAccelerationStructureMemoryRequirementsTypeNV
public enum VkAccelerationStructureMemoryRequirementsTypeNV : Int32
{
ObjectNv = 0,
{
"libName": "SlimBgfx",
"includeDirs": [
"E:\\github\\bgfx\\include",
"E:\\github\\bx\\include",
"E:\\github\\bgfx\\examples\\common",
"E:\\github\\bx\\include\\compat\\msvc",
"E:\\github\\bimg\\include"
],
"defines": [
D3D11 WARNING: ID3D11VertexShader::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS]
e:\github\rbgfx\src\renderer_d3d11.cpp (3907): BGFX Fragment Shader consts 0
D3D11 WARNING: ID3D11PixelShader::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS]
e:\github\rbgfx\src\bgfx.cpp (518): BGFX vertexdecl 74c34f26 (d443ed7f), stride 28
e:\github\rbgfx\src\bgfx.cpp (538): BGFX attr 0 - Attrib::Position, num 3, type 4, norm 0, asint 0, offset 0
e:\github\rbgfx\src\bgfx.cpp (538): BGFX attr 4 - Attrib::Color0, num 4, type 0, norm 1, asint 0, offset 12
e:\github\rbgfx\src\bgfx.cpp (538): BGFX attr 5 - Attrib::Color1, num 4, type 0, norm 1, asint 0, offset 16
e:\github\rbgfx\src\bgfx.cpp (538): BGFX attr 10 - Attrib::TexCoord0, num 2, type 4, norm 0, asint 0, offset 20
e:\github\rbgfx\src\renderer_d3d11.cpp (3907): BGFX Vertex Shader consts 1
e:\
typedef struct { bgfx_vertex_decl_t* _this; bgfx_renderer_type_t _renderer; } bgfx_cmd_arg_vertex_decl_begin_t;
typedef struct { bgfx_vertex_decl_t* _this; bgfx_attrib_t _attrib; uint8_t _num; bgfx_attrib_type_t _type; bool _normalized; bool _asInt; } bgfx_cmd_arg_vertex_decl_add_t;
typedef struct { const bgfx_vertex_decl_t* _this; bgfx_attrib_t _attrib; uint8_t * _num; bgfx_attrib_type_t * _type; bool * _normalized; bool * _asInt; } bgfx_cmd_arg_vertex_decl_decode_t;
typedef struct { const bgfx_vertex_decl_t* _this; bgfx_attrib_t _attrib; } bgfx_cmd_arg_vertex_decl_has_t;
typedef struct { bgfx_vertex_decl_t* _this; uint8_t _num; } bgfx_cmd_arg_vertex_decl_skip_t;
typedef struct { bgfx_vertex_decl_t* _this; } bgfx_cmd_arg_vertex_decl_end_t;
typedef struct { const float * _input; bool _inputNormalized; bgfx_attrib_t _attr; const bgfx_vertex_decl_t * _decl; void * _data; uint32_t _index; } bgfx_cmd_arg_vertex_pack_t;
typedef struct { float * _output; bgfx_attrib_t _attr; const bgfx_vertex_decl_t * _decl; const