mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Delete more unused fbo functions
This commit is contained in:
1 parent
16dda97dfa
commit
089fa4f5a7
3 files changed
+18
-34
No files matched your search
@@ -1014,7 +1014,7 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
DEBUG_LOG(SCEGE, "Displaying FBO %08x", vfb->fb_address);
|
||||
DisableState();
|
||||
|
||||
GLuint colorTexture = fbo_get_color_texture(vfb->fbo);
|
||||
fbo_bind_color_as_texture(vfb->fbo, 0);
|
||||
|
||||
int uvRotation = (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE) ? g_Config.iInternalScreenRotation : ROTATION_LOCKED_HORIZONTAL;
|
||||
|
||||
@@ -1036,15 +1036,15 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
if (cardboardSettings.enabled) {
|
||||
// Left Eye Image
|
||||
glstate.viewport.set(cardboardSettings.leftEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
|
||||
// Right Eye Image
|
||||
glstate.viewport.set(cardboardSettings.rightEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
} else {
|
||||
// Fullscreen Image
|
||||
glstate.viewport.set(0, 0, pixelWidth_, pixelHeight_);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, uvRotation);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, uvRotation);
|
||||
}
|
||||
} else if (usePostShader_ && extraFBOs_.size() == 1 && !postShaderAtOutputResolution_) {
|
||||
// An additional pass, post-processing shader to the extra FBO.
|
||||
@@ -1055,7 +1055,7 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
shaderManager_->DirtyLastShader(); // dirty lastShader_
|
||||
glsl_bind(postShaderProgram_);
|
||||
UpdatePostShaderUniforms(vfb->bufferWidth, vfb->bufferHeight, renderWidth_, renderHeight_);
|
||||
DrawActiveTexture(colorTexture, 0, 0, fbo_w, fbo_h, fbo_w, fbo_h, 0.0f, 0.0f, 1.0f, 1.0f, postShaderProgram_, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, 0, 0, fbo_w, fbo_h, fbo_w, fbo_h, 0.0f, 0.0f, 1.0f, 1.0f, postShaderProgram_, ROTATION_LOCKED_HORIZONTAL);
|
||||
|
||||
fbo_unbind();
|
||||
|
||||
@@ -1065,7 +1065,7 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
ERROR_LOG(G3D, "WTF?");
|
||||
return;
|
||||
}
|
||||
colorTexture = fbo_get_color_texture(extraFBOs_[0]);
|
||||
fbo_bind_color_as_texture(extraFBOs_[0], 0);
|
||||
|
||||
// We are doing the DrawActiveTexture call directly to the backbuffer after here. Hence, we must
|
||||
// flip V.
|
||||
@@ -1074,15 +1074,15 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
if (g_Config.bEnableCardboard) {
|
||||
// Left Eye Image
|
||||
glstate.viewport.set(cardboardSettings.leftEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
|
||||
// Right Eye Image
|
||||
glstate.viewport.set(cardboardSettings.rightEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
} else {
|
||||
// Fullscreen Image
|
||||
glstate.viewport.set(0, 0, pixelWidth_, pixelHeight_);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, uvRotation);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, uvRotation);
|
||||
}
|
||||
|
||||
if (gl_extensions.GLES3 && glInvalidateFramebuffer != nullptr) {
|
||||
@@ -1101,15 +1101,15 @@ void FramebufferManagerGLES::CopyDisplayToOutput() {
|
||||
if (g_Config.bEnableCardboard) {
|
||||
// Left Eye Image
|
||||
glstate.viewport.set(cardboardSettings.leftEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
|
||||
// Right Eye Image
|
||||
glstate.viewport.set(cardboardSettings.rightEyeXPosition, cardboardSettings.screenYPosition, cardboardSettings.screenWidth, cardboardSettings.screenHeight);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, nullptr, ROTATION_LOCKED_HORIZONTAL);
|
||||
} else {
|
||||
// Fullscreen Image
|
||||
glstate.viewport.set(0, 0, pixelWidth_, pixelHeight_);
|
||||
DrawActiveTexture(colorTexture, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, postShaderProgram_, uvRotation);
|
||||
DrawActiveTexture(0, x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, postShaderProgram_, uvRotation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user