Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -12,8 +12,7 @@
#include <cstring>
#include <limits>
ImguiRenderer::ImguiRenderer()
: m_state(df::CreateRenderState(gpu::Program::ImGui, df::DepthLayer::GuiLayer))
ImguiRenderer::ImguiRenderer() : m_state(df::CreateRenderState(gpu::Program::ImGui, df::DepthLayer::GuiLayer))
{
m_state.SetDepthTestEnabled(false);
m_state.SetBlending(dp::Blending(true));
@@ -91,21 +90,20 @@ void ImguiRenderer::Render(ref_ptr<dp::GraphicsContext> context, ref_ptr<dp::Tex
gpu::ImGuiProgramParams const params{.m_projection = m_projection};
context->PushDebugLabel("ImGui Rendering");
m_mesh->Render(context, gpuProgram, m_state, programManager->GetParamsSetter(), params,
[&, this]()
{
context->SetCullingEnabled(false);
for (auto const & drawCall : dataBuffer.m_drawCalls)
{
uint32_t y = drawCall.clipRect.y;
if (context->GetApiVersion() == dp::ApiVersion::OpenGLES3)
y = dataBuffer.m_height - y - drawCall.clipRect.w;
context->SetScissor(drawCall.clipRect.x, y, drawCall.clipRect.z, drawCall.clipRect.w);
m_mesh->DrawPrimitivesSubsetIndexed(context, drawCall.indexCount, drawCall.startIndex);
}
context->SetCullingEnabled(true);
context->SetScissor(0, 0, dataBuffer.m_width, dataBuffer.m_height);
});
m_mesh->Render(context, gpuProgram, m_state, programManager->GetParamsSetter(), params, [&, this]()
{
context->SetCullingEnabled(false);
for (auto const & drawCall : dataBuffer.m_drawCalls)
{
uint32_t y = drawCall.clipRect.y;
if (context->GetApiVersion() == dp::ApiVersion::OpenGLES3)
y = dataBuffer.m_height - y - drawCall.clipRect.w;
context->SetScissor(drawCall.clipRect.x, y, drawCall.clipRect.z, drawCall.clipRect.w);
m_mesh->DrawPrimitivesSubsetIndexed(context, drawCall.indexCount, drawCall.startIndex);
}
context->SetCullingEnabled(true);
context->SetScissor(0, 0, dataBuffer.m_width, dataBuffer.m_height);
});
context->PopDebugLabel();
}
@@ -209,7 +207,7 @@ void ImguiRenderer::UpdateBuffers()
for (int cmdIndex = 0; cmdIndex < cmdList->CmdBuffer.Size; ++cmdIndex)
{
const ImDrawCmd cmd = cmdList->CmdBuffer[cmdIndex];
ImDrawCmd const cmd = cmdList->CmdBuffer[cmdIndex];
ImVec2 clipMin((cmd.ClipRect.x - clipOff.x) * clipScale.x, (cmd.ClipRect.y - clipOff.y) * clipScale.y);
ImVec2 clipMax((cmd.ClipRect.z - clipOff.x) * clipScale.x, (cmd.ClipRect.w - clipOff.y) * clipScale.y);
if (clipMin.x < 0.0f)