From 1183c41ed0382105b34a10c6866d4b163b5cbc10 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 5 Oct 2013 17:30:42 -0700 Subject: [PATCH] In ge debugger, ignore tex alpha based on texfunc. --- Windows/GEDebugger/GEDebugger.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index ffbdffc61d..0223283187 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -263,6 +263,15 @@ void CGEDebugger::UpdatePreviews() { if (bufferResult) { auto fmt = SimpleGLWindow::Format(bufferTex.GetFormat()); texWindow->Draw(bufferTex.GetData(), bufferTex.GetStride(), bufferTex.GetHeight(), bufferTex.GetFlipped(), fmt); + + if (gpuDebug != NULL) { + auto state = gpuDebug->GetGState(); + if (state.isTextureAlphaUsed()) { + texWindow->SetFlags(SimpleGLWindow::ALPHA_BLEND | SimpleGLWindow::RESIZE_SHRINK_CENTER); + } else { + texWindow->SetFlags(SimpleGLWindow::RESIZE_SHRINK_CENTER); + } + } } else { ERROR_LOG(COMMON, "Unable to get texture (may be no texture set.)"); texWindow->Clear();