Add more gfx backend flags (available features)
This commit is contained in:
@@ -141,6 +141,9 @@ void GfxCitro3D::SysInit() {
|
||||
PDLOG("GfxCitro3D::SysInit();");
|
||||
impl = new Impl();
|
||||
Flags |= PDGfxBackendFlags_FlipUV_Y;
|
||||
Flags |= PDGfxBackendFlags_HasClipRect;
|
||||
Flags |= PDGfxBackendFlags_ReqPow2;
|
||||
Flags |= PDGfxBackendFlags_ApproxSDF;
|
||||
impl->pShaderRaw = Pica::AssembleCode(LIShaderCTR);
|
||||
impl->pCode = DVLB_ParseFile((uint32_t*)impl->pShaderRaw.data(),
|
||||
impl->pShaderRaw.size());
|
||||
|
||||
@@ -112,6 +112,7 @@ void GfxDirectX9::SysInit() {
|
||||
}
|
||||
if (psBlob) psBlob->Release();
|
||||
if (errBlob) errBlob->Release();
|
||||
Flags |= PDGfxBackendFlags_HasClipRect;
|
||||
} else {
|
||||
PDERR(
|
||||
"GfxDirectX9::SysInit Error: pDevice is not set!\nYOu need to include "
|
||||
|
||||
@@ -73,6 +73,7 @@ void GfxOpenGL2::pSetupShaderAttribs(u32 shader) {
|
||||
}
|
||||
|
||||
void GfxOpenGL2::SysInit() {
|
||||
Flags |= PDGfxBackendFlags_HasClipRect;
|
||||
pShader = CreateShaderProgram(pVertCode, pFragCode);
|
||||
glUseProgram(pShader);
|
||||
glGenBuffers(1, &VBO);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace PD {
|
||||
void GfxOpenGL3::SysInit() {
|
||||
Flags |= PDGfxBackendFlags_HasClipRect;
|
||||
std::string vcode = SpirvHelper::SPV2GLSL(
|
||||
std::vector<unsigned int>(
|
||||
Shaders::VertexShader,
|
||||
|
||||
@@ -10,7 +10,10 @@ 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
|
||||
PDGfxBackendFlags_WindingCW = 1 << 1, // Use CW instead of CCW winding
|
||||
PDGfxBackendFlags_HasClipRect = 1 << 2, // Clip rects supported
|
||||
PDGfxBackendFlags_ReqPow2 = 1 << 3, // Tex size must be pow of 2
|
||||
PDGfxBackendFlags_ApproxSDF = 1 << 4, // Fake SDF for non smoothstep systems
|
||||
};
|
||||
|
||||
namespace PD {
|
||||
|
||||
+11
-1
@@ -207,7 +207,17 @@ PD_API void Context::MetricsMenu(bool* show) {
|
||||
}
|
||||
m->SeparatorText("Palladium Info");
|
||||
m->Label("Os Driver: {}", PD::Os::GetDriverName());
|
||||
m->Label("Renderer: {}", PD::Gfx::GetDriverName());
|
||||
if (m->BeginTreeNode(
|
||||
std::format("Gfx Driver: {}", PD::Gfx::GetDriverName()))) {
|
||||
m->SeparatorText("Features");
|
||||
if (PD::Gfx::GetFlags() & PDGfxBackendFlags_HasClipRect)
|
||||
m->Label("ClipRects");
|
||||
if (PD::Gfx::GetFlags() & PDGfxBackendFlags_ReqPow2)
|
||||
m->Label("Texture As Pow of 2");
|
||||
if (PD::Gfx::GetFlags() & PDGfxBackendFlags_ApproxSDF)
|
||||
m->Label("SDF Approximation");
|
||||
m->EndTreeNode();
|
||||
}
|
||||
if (m->BeginTreeNode(
|
||||
std::string(std::string("Input: ") + PD::Hid::GetDriverName()))) {
|
||||
/* if (pIO.pCtx.Hid()->Flags & PD::HidDriver::Flags_HasKeyboard) {
|
||||
|
||||
Reference in New Issue
Block a user