From 6b5f30b3340b9de53cdb57a5946c2f57bfbe3cb1 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Sat, 5 Sep 2026 17:02:37 +0200 Subject: [PATCH] Fix Indexorder issues and patchfixsomehow dx9 tex filtering --- backends/source/gfx_directx9.cpp | 4 ++++ include/pd/drivers/gfx.hpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backends/source/gfx_directx9.cpp b/backends/source/gfx_directx9.cpp index a781ffd..7183e28 100644 --- a/backends/source/gfx_directx9.cpp +++ b/backends/source/gfx_directx9.cpp @@ -175,6 +175,10 @@ void GfxDirectX9::SysReset() { impl->Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); impl->Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); impl->Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + + impl->Device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); + impl->Device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); + impl->Device->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); } Li::Texture GfxDirectX9::LoadTexture(const std::vector& pixels, int w, diff --git a/include/pd/drivers/gfx.hpp b/include/pd/drivers/gfx.hpp index 4104d6b..6134f16 100755 --- a/include/pd/drivers/gfx.hpp +++ b/include/pd/drivers/gfx.hpp @@ -125,7 +125,8 @@ class GfxDriverBase : public GfxDriver { while (index < commands.size() && CurrentTexIsSDF == commands[index].SDF && (CurrentTex == commands[index].Tex || - (CurrentTex == pWhite.GetID() && commands[index].Tex == 0))) { + (CurrentTex == pWhite.GetID() && commands[index].Tex == 0)) && + commands[index].FirstIndex == startidx + num_indices) { num_indices += commands[index].IndexCount; index++; }