Skip to content

Instantly share code, notes, and snippets.

@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~~|
-- |-\|//-.
-- /|`.|'.' \
--|,|.\~~ /||
--|:|| ';||
--|||| | ||
namespace CXApi;
enum CppPrimitiveKind : ushort
{
Unknown = 0, Void, Ptr, Bool,
Char, WideChar, SChar,
UInt16, UInt32, UInt64,
Int16, Int32, Int64,
Float32, Float64
using System;
using System.Runtime.InteropServices;
using static LowSharp;
using System.Numerics;
namespace LibBgfx
{
[Flags]
public enum ResetFlags : long
{
@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;
namespace SharpAllocator
{
public struct BufferHeader
{
public uint Head;
public uint Size;
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (2908): BGFX Init...
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1441): BGFX Application called bgfx::renderFrame directly, not creating render thread.
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1457): BGFX Running in multi-threaded mode
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'example-00-helloworldDebug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Cannot find or open the PDB file.
'example-00-helloworldDebug.
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (2908): BGFX Init...
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1441): BGFX Application called bgfx::renderFrame directly, not creating render thread.
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1457): BGFX Running in multi-threaded mode
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (196): BGFX Adapter #0
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (200): BGFX Description: Intel(R) Iris(TM) Graphics 540
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (206): BGFX VendorId: 0x00008086, DeviceId: 0x00001926, SubSysId: 0x20638086, Revision: 0x0000000a
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (211): BGFX Memory: 201326592 (video), 4502506577084809216 (system), 46710346335253188 (shared)
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (247): BGFX Output #0
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (251): BGFX DeviceName: \\.\DISPLAY1
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (257): BGFX DesktopCoordinates: 0, 0, 1920, 1080
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (200): BGFX Description: Intel(R) Iris(TM) Graphics 540
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (206): BGFX VendorId: 0x00008086, DeviceId: 0x00001926, SubSysId: 0x20638086, Revision: 0x0000000a
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (211): BGFX Memory: 201326592 (video), -1615289549947142144 (system), 633870532324619736 (shared)
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (247): BGFX Output #0
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (251): BGFX DeviceName: \\.\DISPLAY1
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (257): BGFX DesktopCoordinates: 0, 0, 1920, 1080
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (258): BGFX AttachedToDesktop: 1
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (259): BGFX Rotation: 1
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (293): BGFX DXGI device 11.3, hr 80004002
d:\gamedev\toy\mud\3rdparty\bgfx\src\dxgi.cpp (293): BGFX DXGI device 11.2, hr 80004002
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (2908): BGFX Init...
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1448): BGFX Creating rendering thread.
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1457): BGFX Running in multi-threaded mode
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx_p.h (2712): BGFX render thread start
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1183): BGFX
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1209): BGFX Supported renderer backends (6):
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1212): BGFX - Noop
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1212): BGFX - Direct3D 9
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1212): BGFX - Direct3D 11
d:\gamedev\toy\mud\3rdparty\bgfx\src\bgfx.cpp (1212): BGFX - Direct3D 12
INFO: Init Gfx System
INFO: resource path: d:/gamedev/toy/data/
INFO: Creating GLFW context. GLFW version 3.3
ERROR: GLFW 65546: Cannot make current with a window that has no OpenGL or OpenG
L ES context
ERROR: GLFW 65538: Cannot set swap interval without a current OpenGL or OpenGL E
S context
GfxSystem: Native Handle = 000B0558
GfxSystem: bgfx::init
INFO: Loaded image d:/gamedev/toy/data/textures/white.png of size 4 B in memory