mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-18 00:40:30 +02:00
ActivateTopScissor doesn't belong in UIContext::Begin.
This commit is contained in:
1 parent
2d01db805e
commit
260fd3c9ee
4 files changed
+4
-9
No files matched your search
+2
-6
@@ -1165,11 +1165,6 @@ void EmuScreen::preRender() {
|
||||
using namespace Draw;
|
||||
DrawContext *draw = screenManager()->getDrawContext();
|
||||
draw->BeginFrame();
|
||||
// Let's be consistent for the entire frame. We skip the UI texture if we don't need it.
|
||||
hasVisibleUI_ = hasVisibleUI();
|
||||
if (hasVisibleUI_) {
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
}
|
||||
// Here we do NOT bind the backbuffer or clear the screen, unless non-buffered.
|
||||
// The emuscreen is different than the others - we really want to allow the game to render to framebuffers
|
||||
// before we ever bind the backbuffer for rendering. On mobile GPUs, switching back and forth between render
|
||||
@@ -1268,7 +1263,8 @@ void EmuScreen::render() {
|
||||
if (invalid_)
|
||||
return;
|
||||
|
||||
if (hasVisibleUI_) {
|
||||
if (hasVisibleUI()) {
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
renderUI();
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@ private:
|
||||
bool invalid_;
|
||||
bool quit_;
|
||||
bool stopRender_ = false;
|
||||
bool hasVisibleUI_ = true;
|
||||
std::string errorMessage_;
|
||||
|
||||
// If set, pauses at the end of the frame.
|
||||
|
||||
@@ -38,12 +38,12 @@ void UIContext::BeginFrame() {
|
||||
FLOG("Failed to load ui_atlas.zim");
|
||||
}
|
||||
}
|
||||
ActivateTopScissor();
|
||||
}
|
||||
|
||||
void UIContext::Begin() {
|
||||
draw_->BindSamplerStates(0, 1, &sampler_);
|
||||
draw_->BindTexture(0, uitexture_->GetTexture());
|
||||
ActivateTopScissor();
|
||||
UIBegin(ui_pipeline_);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ void UIScreen::preRender() {
|
||||
return;
|
||||
}
|
||||
draw->BeginFrame();
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
// Bind and clear the back buffer
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, 0xFF000000 });
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
|
||||
Draw::Viewport viewport;
|
||||
viewport.TopLeftX = 0;
|
||||
|
||||
Reference in new issue
Block a user