mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 00:33:34 +01:00
Unify (well, almost) GetOutputFramebuffer (D3D11/GL)
This commit is contained in:
1 parent
214270d192
commit
f2ea0ce472
8 files changed
+36
-94
No files matched your search
@@ -1130,12 +1130,9 @@ void FramebufferManagerGLES::Resized() {
|
||||
}
|
||||
|
||||
bool FramebufferManagerGLES::GetOutputFramebuffer(GPUDebugBuffer &buffer) {
|
||||
int pw = PSP_CoreParameter().pixelWidth;
|
||||
int ph = PSP_CoreParameter().pixelHeight;
|
||||
|
||||
// The backbuffer is flipped (last bool)
|
||||
buffer.Allocate(pw, ph, GPU_DBG_FORMAT_888_RGB, true);
|
||||
draw_->CopyFramebufferToMemorySync(nullptr, Draw::FB_COLOR_BIT, 0, 0, pw, ph, Draw::DataFormat::R8G8B8_UNORM, buffer.GetData(), pw);
|
||||
CHECK_GL_ERROR_IF_DEBUG();
|
||||
int w, h;
|
||||
draw_->GetFramebufferDimensions(nullptr, &w, &h);
|
||||
buffer.Allocate(w, h, GPU_DBG_FORMAT_888_RGB, true);
|
||||
draw_->CopyFramebufferToMemorySync(nullptr, Draw::FB_COLOR_BIT, 0, 0, w, h, Draw::DataFormat::R8G8B8_UNORM, buffer.GetData(), w);
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user