Move compiledraw2dprogram out of DrawActiveTexture

This commit is contained in:
Henrik Rydgard committed 2017-02-15 21:51:39 +01:00
1 parent f95ab4a0fa
commit 3ac0fc2466
1 file changed
+4 -3
+4 -3
View File
@@ -407,9 +407,6 @@ void FramebufferManagerGLES::DrawFramebufferToOutput(const u8 *srcPixels, GEBuff
// TODO: This could totally use fbo_blit.
void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float h, float destW, float destH, float u0, float v0, float u1, float v1, GLSLProgram *program, int uvRotation, bool linearFilter) {
if (!program) {
if (!draw2dprogram_) {
CompileDraw2DProgram();
}
program = draw2dprogram_;
}
@@ -1496,6 +1493,10 @@ void FramebufferManagerGLES::EndFrame() {
SetLineWidth();
}
if (!draw2dprogram_) {
CompileDraw2DProgram();
}
// We flush to memory last requested framebuffer, if any.
// Only do this in the read-framebuffer modes.
if (updateVRAM_)