From 030058e3fcf426aaf733b5b9c6f1e868dcda6f92 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 29 Apr 2011 23:48:46 +0000 Subject: [PATCH] - revert a render method to the 3.4 version for better ATI card support (thanks for pointing this out sojourner) --- source/glest_game/graphics/renderer.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 3fac8321..6825d206 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -4773,6 +4773,9 @@ void Renderer::renderTile(const Vec2i &pos) { void Renderer::renderQuad(int x, int y, int w, int h, const Texture2D *texture) { +/* Revert back to 3.4.0 render logic due to issues on some ATI cards + * + if(w < 0) { w = texture->getPixmapConst()->getW(); } @@ -4806,8 +4809,16 @@ void Renderer::renderQuad(int x, int y, int w, int h, const Texture2D *texture) glDisableClientState(GL_VERTEX_ARRAY); //glClientActiveTexture(GL_TEXTURE0); glDisableClientState(GL_TEXTURE_COORD_ARRAY); +*/ -/* + if(w < 0) { + w = texture->getPixmapConst()->getW(); + } + if(h < 0) { + h = texture->getPixmapConst()->getH(); + } + + glBindTexture(GL_TEXTURE_2D, static_cast(texture)->getHandle()); glBegin(GL_TRIANGLE_STRIP); glTexCoord2i(0, 1); glVertex2i(x, y+h); @@ -4818,7 +4829,6 @@ void Renderer::renderQuad(int x, int y, int w, int h, const Texture2D *texture) glTexCoord2i(1, 0); glVertex2i(x+w, y); glEnd(); -*/ } Renderer::Shadows Renderer::strToShadows(const string &s){