In ge debugger, ignore tex alpha based on texfunc.

This commit is contained in:
Unknown W. Brackets 2013-10-05 17:30:42 -07:00
parent c104c6dee8
commit 1183c41ed0

View file

@ -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();