DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
EditorTexture.h File Reference

Classes

struct  DekiEditor::EditorTexture::Backend
 What the editor draws textures with. More...

Namespaces

namespace  DekiEditor
namespace  DekiEditor::EditorTexture
 Pictures the editor UI draws: the Scene and Play views, asset previews, font atlases.

Enumerations

enum class  DekiEditor::EditorTexture::Format : uint8_t { DekiEditor::EditorTexture::Rgba8 , DekiEditor::EditorTexture::Rgb565 }
 How the pixels handed to Update are laid out. More...

Functions

void DekiEditor::EditorTexture::AddImageNearest (ImDrawList *drawList, uint32_t texture, const ImVec2 &min, const ImVec2 &max, const ImVec2 &uvMin=ImVec2(0, 0), const ImVec2 &uvMax=ImVec2(1, 1))
 Adds it to drawList sampled nearest, so each texel stays a sharp square when it is drawn bigger than it is (the game view, pixel art).
uint32_t DekiEditor::EditorTexture::Create (int width, int height)
 A width x height texture.
uint32_t DekiEditor::EditorTexture::CreateRgba (int width, int height, const void *rgba)
 A texture with these RGBA8 pixels, rows packed: Create, then Update.
void DekiEditor::EditorTexture::Destroy (uint32_t texture)
 Frees it. 0 is ignored.
void DekiEditor::EditorTexture::SetBackend (const Backend *backend)
 Called by the editor. Null takes it away again.
ImTextureID DekiEditor::EditorTexture::ToImGui (uint32_t texture)
 What ImGui takes for it.
void DekiEditor::EditorTexture::Update (uint32_t texture, int x, int y, int width, int height, Format format, const void *pixels, int rowPixels=0)
 Replaces the pixels in the rectangle at (x, y).