From 60128e1b06b55ad3e53339b6946c0ee17dbb7af0 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sat, 2 Jul 2011 18:17:47 +0200 Subject: [PATCH] Fix quads on computers supporting npot textures --- src/modules/graphics/opengl/Quad.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/Quad.cpp b/src/modules/graphics/opengl/Quad.cpp index b6b0eaf10..53d583898 100644 --- a/src/modules/graphics/opengl/Quad.cpp +++ b/src/modules/graphics/opengl/Quad.cpp @@ -21,6 +21,9 @@ #include "Quad.h" #include +// GLee +#include "GLee.h" + // STD #include // For memcpy @@ -43,8 +46,11 @@ namespace opengl void Quad::refresh(const Viewport & v, int sw, int sh) { - sw = next_p2(sw); - sh = next_p2(sh); + if (GLEE_ARB_texture_non_power_of_two) + { + sw = next_p2(sw); + sh = next_p2(sh); + } viewport = v; vertices[0].x = 0;