widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #07419
[Merge] lp:~widelands-dev/widelands/bug-1536377-texture-atlas-size into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1536377-texture-atlas-size into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1536377 in widelands: "The texture atlas must use at least 2048 as size (1024 was given)"
https://bugs.launchpad.net/widelands/+bug/1536377
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1536377-texture-atlas-size/+merge/293067
Ugly hack - let's see if this works. We need a Windows build.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1536377-texture-atlas-size into lp:widelands.
=== modified file 'src/graphic/gl/initialize.cc'
--- src/graphic/gl/initialize.cc 2016-02-05 18:29:22 +0000
+++ src/graphic/gl/initialize.cc 2016-04-27 09:42:14 +0000
@@ -131,6 +131,12 @@
glGetIntegerv(GL_MAX_TEXTURE_SIZE, max_texture_size);
log("Graphics: OpenGL: Max texture size: %u\n", *max_texture_size);
+ // TODO(GunChleoc): Ugly hack for graphics cards that misreport their max texture size.
+ // We are assuming that this isn't an ancient graphics card.
+ if (*max_texture_size < 2048) {
+ log("We are assuming that the max texture size got underreported by GL, we need at least 2048 here");
+ *max_texture_size = 2048;
+ }
log("Graphics: OpenGL: ShadingLanguage: \"%s\"\n",
reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION)));
Follow ups