Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
Deki Namespace Reference

Namespaces

namespace  AuthoredFormat

Classes

class  AssetLookupTable
class  AssetManager
class  AssetPackReader
struct  AssetRef
 Type-safe asset reference wrapper. More...
struct  AssetRefBase
 Base class for type-erased access to AssetRef. More...
class  Color
 RGBA colour with packed-format conversions (RGB565, RGBA8888). More...
struct  DPackEntry
struct  DPackHeader
struct  LoadedPack
struct  PackIndexEntry

Functions

std::string GenerateDeterministicGuid (const std::string &seed)
 Generate a deterministic GUID from a seed string.
void SetImGuiContext (void *context)
 Set ImGui context for DLL boundary crossing.
void SetImGuiAllocators (void *(*allocFunc)(size_t sz, void *userData), void(*freeFunc)(void *ptr, void *userData), void *userData)
 Share the host's ImGui allocators with this DLL.

Variables

static constexpr char DPACK_MAGIC [4] = { 'D', 'P', 'A', 'K' }
static constexpr uint32_t DPACK_VERSION = 1

Function Documentation

◆ GenerateDeterministicGuid()

std::string Deki::GenerateDeterministicGuid ( const std::string & seed)

Generate a deterministic GUID from a seed string.

Uses FNV-1a hash to generate a UUID-like string that is always the same for a given seed. Useful for generating cache GUIDs from source asset + parameters (e.g., "fontGuid:fontSize").

Parameters
seedThe seed string to hash
Returns
A UUID-formatted string (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

◆ SetImGuiContext()

void Deki::SetImGuiContext ( void * context)

Set ImGui context for DLL boundary crossing.

The editor must call this before using any windows that use ImGui. This ensures that ImGui state is shared correctly across the DLL boundary.

◆ SetImGuiAllocators()

void Deki::SetImGuiAllocators ( void * allocFunc (*)(size_t sz, void *userData),
void(* freeFunc )(void *ptr, void *userData),
void * userData )

Share the host's ImGui allocators with this DLL.

Sharing only the context is not enough: this DLL links its own copy of ImGui, so it also has its own GImAllocatorAllocFunc/FreeFunc defaulting to its CRT heap. Any ImGui object allocated on one side and freed on the other would then cross heaps. Call this BEFORE SetImGuiContext and before any ImGui use.

Signatures match ImGuiMemAllocFunc / ImGuiMemFreeFunc; spelled out here so the header does not have to pull in imgui.h.

Variable Documentation

◆ DPACK_MAGIC

char Deki::DPACK_MAGIC[4] = { 'D', 'P', 'A', 'K' }
staticconstexpr

◆ DPACK_VERSION

uint32_t Deki::DPACK_VERSION = 1
staticconstexpr