|
Foundation
|
#include "ImGui.hpp"#include <filesystem>#include "tracy/Tracy.hpp"#include <RenderCore/Bindless.hpp>#include <RenderCore/ImmediateContext.hpp>#include <SDL3/SDL.h>#include <imgui_impl_sdl3.h>Classes | |
| struct | ImGuiImplFoundationBd |
| struct | PushConstants |
Variables | |
| constexpr size_t | kMaxTextures = 1024 |
| constexpr size_t | kUploadBudget = 16 * (1u << 20) |
| constexpr size_t | kVertexBufferSize = 16 * (1u << 20) |
| constexpr size_t | kIndexBufferSize = 16 * (1u << 20) |
| const char * | kDefaultFontPath = "./data/assets/LXGWNeoXiHei.ttf" |
| UniquePtr< BindlessPool > | gImGuiTexturePool = nullptr |
| struct ImGuiImplFoundationBd | gBackendData |
| ImTextureID ImGui_ImplFoundation_AddImage | ( | Foundation::RHI::RHITextureView * | textureView, |
| ImGui_ImplFoundation_ImageSampler | sampler = ImGuiImplFoundationImageSamplerLinear |
||
| ) |
Registers a texture with the ImGui backend so it can be displayed in the UI.
| textureView | The texture view to be used. |
| sampler | The sampler to be used for the texture. |
| Pair< uint32_t, ImGui_ImplFoundation_ImageSampler > ImGui_ImplFoundation_DecodeImTextureID | ( | ImTextureID | id | ) |
| ImTextureID ImGui_ImplFoundation_EncodeImTextureID | ( | uint32_t | handle, |
| ImGui_ImplFoundation_ImageSampler | sampler = ImGuiImplFoundationImageSamplerLinear |
||
| ) |
| void ImGui_ImplFoundation_ImplCreateResources | ( | Renderer * | renderer, |
| ResourceHandle & | outVtxBuffer, | ||
| ResourceHandle & | outIdxBuffer, | ||
| ResourceHandle & | outLinearSampler, | ||
| ResourceHandle & | outNearestSampler | ||
| ) |
| void ImGui_ImplFoundation_ImplPassRecord | ( | PassHandle | self, |
| Renderer * | r, | ||
| bool | clear, | ||
| RHICommandList * | cmd, | ||
| ResourceHandle | vtxBuffer, | ||
| ResourceHandle | idxBuffer | ||
| ) |
| void ImGui_ImplFoundation_ImplPassSetup | ( | PassHandle | self, |
| Renderer * | r, | ||
| ResourceHandle | vtxBuffer, | ||
| ResourceHandle | idxBuffer, | ||
| ResourceHandle | linSampler, | ||
| ResourceHandle | nearSampler | ||
| ) |
| void ImGui_ImplFoundation_ImplUpdateTexture | ( | ImTextureData * | tex | ) |
| void ImGui_ImplFoundation_Init | ( | Foundation::RHI::RHIDevice * | device, |
| SDL_Window * | window | ||
| ) |
@breif Initialize global context (TexturePool, etc.) for our ImGui backend Call this once context is created, within BeginSetup/EndSetup block of your Renderer.
| device | RHIDevice of the Renderer |
| window | SDL_Window |
| clear | Whether to clear the render target before drawing. |
| dependOn | (Optional) A pass to depend on. You may want this if the prior pass writes to resources ImGui may renderer (e.g. through ImGui_ImplFoundation_AddImage). If the prior pass writes to the backbuffer as well, this is not required as dependency will be automatically created. |
| void * ImGui_ImplFoundation_MemAlloc | ( | size_t | sz, |
| void * | |||
| ) |
| void ImGui_ImplFoundation_MemFree | ( | void * | ptr, |
| void * | |||
| ) |
| void ImGui_ImplFoundation_NewFrame | ( | ) |
Starts a new ImGui frame.
| void ImGui_ImplFoundation_ProcessEvent | ( | SDL_Event * | event | ) |
Processes one SDL event and forwards it to ImGui.
| event | The SDL event to be processed. |
| void ImGui_ImplFoundation_RemoveImage | ( | ImTextureID | textureID | ) |
Unregisters a texture from the ImGui backend.
| textureID | The ID returned by ImGui_ImplFoundation_AddImage. |
| void ImGui_ImplFoundation_SetupContextWithDefaultStyles | ( | ) |
Applies a default, vaguely stylish theme to the ImGui context.
| void ImGui_ImplFoundation_Shutdown | ( | ) |
Shuts down the ImGui backend and releases all resources.
| struct ImGuiImplFoundationBd gBackendData |
| UniquePtr<BindlessPool> gImGuiTexturePool = nullptr |
| const char* kDefaultFontPath = "./data/assets/LXGWNeoXiHei.ttf" |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |