mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-13 20:22:38 +00:00
GEDebugger: Add option to force texture opaqueness
This commit is contained in:
parent
6c38b22467
commit
1f5c28ca62
@ -226,11 +226,9 @@ void CGEDebugger::UpdatePreviews() {
|
||||
bufferResult = GPU_GetCurrentTexture(texBuffer_, textureLevel_);
|
||||
|
||||
if (bufferResult) {
|
||||
auto fmt = SimpleGLWindow::Format(texBuffer_->GetFormat());
|
||||
texWindow->Draw(texBuffer_->GetData(), texBuffer_->GetStride(), texBuffer_->GetHeight(), texBuffer_->GetFlipped(), fmt);
|
||||
|
||||
if (gpuDebug != NULL) {
|
||||
if (state.isTextureAlphaUsed()) {
|
||||
bool forceOpaque = SendMessage(GetDlgItem(m_hDlg, IDC_GEDBG_FORCEOPAQUE), BM_GETCHECK, 0, 0) != 0;
|
||||
if (state.isTextureAlphaUsed() && !forceOpaque) {
|
||||
texWindow->SetFlags(SimpleGLWindow::ALPHA_BLEND | SimpleGLWindow::RESIZE_SHRINK_CENTER);
|
||||
} else {
|
||||
texWindow->SetFlags(SimpleGLWindow::RESIZE_SHRINK_CENTER);
|
||||
@ -242,6 +240,9 @@ void CGEDebugger::UpdatePreviews() {
|
||||
} else {
|
||||
UpdateLastTexture((u32)-1);
|
||||
}
|
||||
|
||||
auto fmt = SimpleGLWindow::Format(texBuffer_->GetFormat());
|
||||
texWindow->Draw(texBuffer_->GetData(), texBuffer_->GetStride(), texBuffer_->GetHeight(), texBuffer_->GetFlipped(), fmt);
|
||||
} else if (texWindow != NULL) {
|
||||
texWindow->Clear();
|
||||
texBuffer_ = nullptr;
|
||||
@ -613,6 +614,13 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
ResumeFromStepping();
|
||||
breakNext = BREAK_NONE;
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_FORCEOPAQUE:
|
||||
if (attached && gpuDebug != NULL) {
|
||||
UpdatePreviews();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -181,9 +181,10 @@ BEGIN
|
||||
CONTROL "",IDC_GEDBG_MAINTAB,"SysTabControl32",TCS_TABS | TCS_FOCUSNEVER,10,216,480,180
|
||||
EDITTEXT IDC_GEDBG_FRAMEBUFADDR,148,192,200,12,ES_READONLY | NOT WS_BORDER
|
||||
EDITTEXT IDC_GEDBG_TEXADDR,10,152,128,12,ES_READONLY | NOT WS_BORDER
|
||||
PUSHBUTTON "Break on Te&xture...",IDC_GEDBG_BREAKTEX,24,168,100,14
|
||||
PUSHBUTTON "Level -",IDC_GEDBG_TEXLEVELDOWN,24,188,40,14
|
||||
PUSHBUTTON "Level +",IDC_GEDBG_TEXLEVELUP,84,188,40,14
|
||||
CONTROL "Force opaque",IDC_GEDBG_FORCEOPAQUE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,164,60,12
|
||||
PUSHBUTTON "Break on Te&xture...",IDC_GEDBG_BREAKTEX,24,176,100,14
|
||||
PUSHBUTTON "Level -",IDC_GEDBG_TEXLEVELDOWN,24,192,40,14
|
||||
PUSHBUTTON "Level +",IDC_GEDBG_TEXLEVELUP,84,192,40,14
|
||||
CONTROL "",IDC_GEDBG_FBTABS,"SysTabControl32",TCS_BUTTONS | TCS_FOCUSNEVER,384,192,110,12
|
||||
END
|
||||
|
||||
|
@ -161,6 +161,7 @@
|
||||
#define IDC_GEDBG_VERTICES 1194
|
||||
#define IDC_GEDBG_RAWVERTS 1195
|
||||
#define IDC_GEDBG_MATRICES 1196
|
||||
#define IDC_GEDBG_FORCEOPAQUE 1197
|
||||
|
||||
#define ID_SHADERS_BASE 5000
|
||||
|
||||
@ -330,7 +331,7 @@
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 256
|
||||
#define _APS_NEXT_COMMAND_VALUE 40152
|
||||
#define _APS_NEXT_CONTROL_VALUE 1197
|
||||
#define _APS_NEXT_CONTROL_VALUE 1198
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user