Skip to content

Instantly share code, notes, and snippets.

//imgui native:
[DllImport(cimguiLib)]
public static extern byte* igGetVersion();
//imgui
public static unsafe string GetVersion()
{
var version = ImGuiNative.igGetVersion();
int length = 0;
while (version[length] != '\0')
diff --git a/sdlvideo.inc b/sdlvideo.inc
index ca254c9..5310c46 100644
--- a/sdlvideo.inc
+++ b/sdlvideo.inc
@@ -1222,6 +1222,25 @@ function SDL_GL_GetCurrentWindow: PSDL_Window cdecl; external SDL_LibName {$IFDE
function SDL_GL_GetCurrentContext: TSDL_GLContext cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GL_GetCurrentContext' {$ENDIF} {$ENDIF};
{**
+ * Get the size of a window's underlying drawable in pixels (for use
+ * with glViewport).
public unsafe class Utf8Buffer
{
private const int BufferSize = 4 * 1024 * 20; //20k utf8 chars at least
private IntPtr _memPtr;
private byte* _buffer;
private int _usedBytes;
public Utf8Buffer()
{
Init();
@dpethes
dpethes / DAsmJit_MathPresso
Created July 16, 2021 11:24
mathpresso port for DAsmJit
unit DAsmJit_MathPresso;
{$I DAsmJit.inc}
interface
uses
DAsmJit;
type