rename PDBackendFlags to PDGfxBackendFlags
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#include <pd/lithium/pools.hpp>
|
||||
#include <pd/lithium/texture.hpp>
|
||||
|
||||
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<Li::Command>& 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<TextureID, Li::Texture> 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(); }
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ PD_API void Font::LoadTTF(const std::vector<u8>& data, int px_height) {
|
||||
uvs.z = (off.x + w) / static_cast<float>(texszs);
|
||||
uvs.w = (off.y + h) / static_cast<float>(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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user