From 8215baac99371c4a235d7482eaaf9d84e900638f Mon Sep 17 00:00:00 2001 From: tobid7 Date: Fri, 3 Apr 2026 12:52:30 +0200 Subject: [PATCH] rename PDBackendFlags to PDGfxBackendFlags --- backends/source/gfx_citro3d.cpp | 2 +- include/pd/drivers/gfx.hpp | 16 ++++++++-------- source/lithium/font.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backends/source/gfx_citro3d.cpp b/backends/source/gfx_citro3d.cpp index 09c3962..c2901f5 100644 --- a/backends/source/gfx_citro3d.cpp +++ b/backends/source/gfx_citro3d.cpp @@ -119,7 +119,7 @@ void GfxCitro3D::SysInit() { if (impl) return; PDLOG("GfxCitro3D::SysInit();"); impl = new Impl(); - Flags |= PDBackendFlags_FlipUV_Y; + Flags |= PDGfxBackendFlags_FlipUV_Y; impl->pShaderRaw = Pica::AssembleCode(LIShaderCTR); impl->pCode = DVLB_ParseFile((uint32_t*)impl->pShaderRaw.data(), impl->pShaderRaw.size()); diff --git a/include/pd/drivers/gfx.hpp b/include/pd/drivers/gfx.hpp index 4872f73..920862e 100755 --- a/include/pd/drivers/gfx.hpp +++ b/include/pd/drivers/gfx.hpp @@ -6,11 +6,11 @@ #include #include -using PDBackendFlags = PD::u32; -enum PDBackendFlags_ { - PDBackendFlags_None = 0, - PDBackendFlags_FlipUV_Y = 1 << 0, // Essential for font loading - PDBackendFlags_WindingCW = 1 << 0, // Use CW instead of CCW winding +using PDGfxBackendFlags = PD::u32; +enum PDGfxBackendFlags_ { + PDGfxBackendFlags_None = 0, + PDGfxBackendFlags_FlipUV_Y = 1 << 0, // Essential for font loading + PDGfxBackendFlags_WindingCW = 1 << 0, // Use CW instead of CCW winding }; namespace PD { @@ -40,7 +40,7 @@ class PD_API GfxDriver : public DriverInterface { virtual void DeleteTexture(const Li::Texture& tex) {} virtual void Draw(const Pool& commands) {} Li::Texture::Ptr GetWhiteTexture() { return &pWhite; } - PDBackendFlags GetFlags() { return Flags; } + PDGfxBackendFlags GetFlags() { return Flags; } size_t GetNumVertices() const { return CountVertices; } size_t GetNumIndices() const { return CountIndices; } @@ -70,7 +70,7 @@ class PD_API GfxDriver : public DriverInterface { ivec2 ViewPort; std::unordered_map pTextureRegestry; Li::Texture pWhite; - PDBackendFlags Flags = 0; + PDGfxBackendFlags Flags = 0; }; struct DefaultGfxConfig { @@ -174,7 +174,7 @@ class PD_API Gfx { return driver->GetWhiteTexture(); } - static PDBackendFlags GetFlags() { return driver->GetFlags(); } + static PDGfxBackendFlags GetFlags() { return driver->GetFlags(); } static const char* GetDriverName() { return driver->GetName(); } diff --git a/source/lithium/font.cpp b/source/lithium/font.cpp index 5727937..f2a847c 100644 --- a/source/lithium/font.cpp +++ b/source/lithium/font.cpp @@ -103,7 +103,7 @@ PD_API void Font::LoadTTF(const std::vector& data, int px_height) { uvs.z = (off.x + w) / static_cast(texszs); uvs.w = (off.y + h) / static_cast(texszs); // Flip if needed - if (PD::Gfx::GetFlags() & PDBackendFlags_FlipUV_Y) { + if (PD::Gfx::GetFlags() & PDGfxBackendFlags_FlipUV_Y) { uvs.y = 1.f - uvs.y; uvs.w = 1.f - uvs.w; }