← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/font_rendering_bug into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/font_rendering_bug into lp:widelands.

Commit message:
Flush pipeline before switching bound framebuffer to work around buggy OpenGL implementations.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1535732 in widelands: "Texts not displayed correctly with the new font renderer"
  https://bugs.launchpad.net/widelands/+bug/1535732

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/font_rendering_bug/+merge/304975
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/font_rendering_bug into lp:widelands.
=== modified file 'src/graphic/gl/utils.cc'
--- src/graphic/gl/utils.cc	2016-08-04 15:49:05 +0000
+++ src/graphic/gl/utils.cc	2016-09-06 08:04:16 +0000
@@ -220,6 +220,11 @@
 		return;
 	}
 
+	// Some graphic drivers inaccurately do not flush their pipeline when
+	// switching the framebuffer - and happily do draw calls into the wrong
+	// framebuffers. I AM LOOKING AT YOU, INTEL!!!
+	glFlush();
+
 	glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
 	if (framebuffer != 0) {
 		unbind_texture_if_bound(texture);


Follow ups