CI, Backends: fixes for example_null building. Add consistent IMGUI_IMPL_API in backend.

This commit is contained in:
ocornut
2025-11-17 16:18:12 +01:00
parent d99baf332c
commit 0cf5b93a0a
3 changed files with 33 additions and 33 deletions

View File

@@ -17,46 +17,46 @@
#ifndef IMGUI_DISABLE
#include "imgui_impl_null.h"
bool ImGui_ImplNull_Init()
IMGUI_IMPL_API bool ImGui_ImplNull_Init()
{
ImGui_ImplNullPlatform_Init();
ImGui_ImplNullRender_Init();
return true;
}
void ImGui_ImplNull_Shutdown()
IMGUI_IMPL_API void ImGui_ImplNull_Shutdown()
{
ImGui_ImplNullRender_Shutdown();
ImGui_ImplNullPlatform_Shutdown();
}
void ImGui_ImplNull_NewFrame()
IMGUI_IMPL_API void ImGui_ImplNull_NewFrame()
{
ImGui_ImplNullPlatform_NewFrame();
ImGui_ImplNullRender_NewFrame();
}
bool ImGui_ImplNullPlatform_Init()
IMGUI_IMPL_API bool ImGui_ImplNullPlatform_Init()
{
ImGuiIO& io = ImGui::GetIO();
io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
return true;
}
void ImGui_ImplNullPlatform_Shutdown()
IMGUI_IMPL_API void ImGui_ImplNullPlatform_Shutdown()
{
ImGuiIO& io = ImGui::GetIO();
io.BackendFlags &= ~ImGuiBackendFlags_HasMouseCursors;
}
void ImGui_ImplNullPlatform_NewFrame()
IMGUI_IMPL_API void ImGui_ImplNullPlatform_NewFrame()
{
ImGuiIO& io = ImGui::GetIO();
io.DisplaySize = ImVec2(1920, 1080);
io.DeltaTime = 1.0f / 60.0f;
}
bool ImGui_ImplNullRender_Init()
IMGUI_IMPL_API bool ImGui_ImplNullRender_Init()
{
ImGuiIO& io = ImGui::GetIO();
io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset;
@@ -64,14 +64,14 @@ bool ImGui_ImplNullRender_Init()
return true;
}
void ImGui_ImplNullRender_Shutdown()
IMGUI_IMPL_API void ImGui_ImplNullRender_Shutdown()
{
ImGuiIO& io = ImGui::GetIO();
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasVtxOffset;
io.BackendFlags &= ~ImGuiBackendFlags_RendererHasTextures;
}
void ImGui_ImplNullRender_NewFrame()
IMGUI_IMPL_API void ImGui_ImplNullRender_NewFrame()
{
}
@@ -86,7 +86,7 @@ void ImGui_ImplNullRender_UpdateTexture(ImTextureData* tex)
}
}
void ImGui_ImplNullRender_RenderDrawData(ImDrawData* draw_data)
IMGUI_IMPL_API void ImGui_ImplNullRender_RenderDrawData(ImDrawData* draw_data)
{
if (draw_data->Textures != nullptr)
for (ImTextureData* tex : *draw_data->Textures)