|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-06 22:33:58
|
Module: performous
Branch: master
Commit: d6e17e26ed5ae0d17ffab982f00649a5bad39695
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jan 7 00:32:49 2010 +0200
Use GL_TRIANGLE_STRIP instead of GL_QUADS for OpenGL ES compatibility
---
game/surface.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/surface.hh b/game/surface.hh
index 0fab49a..3cb6a7d 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -128,11 +128,11 @@ class UseTexture: boost::noncopyable {
template <GLenum Type> void OpenGLTexture<Type>::draw(Dimensions const& dim, TexCoords const& tex) const {
UseTexture texture(*this);
- glutil::Begin block(GL_QUADS);
+ glutil::Begin block(GL_TRIANGLE_STRIP);
glTexCoord2f(tex.x1, tex.y1); glVertex2f(dim.x1(), dim.y1());
glTexCoord2f(tex.x2, tex.y1); glVertex2f(dim.x2(), dim.y1());
- glTexCoord2f(tex.x2, tex.y2); glVertex2f(dim.x2(), dim.y2());
glTexCoord2f(tex.x1, tex.y2); glVertex2f(dim.x1(), dim.y2());
+ glTexCoord2f(tex.x2, tex.y2); glVertex2f(dim.x2(), dim.y2());
}
template <GLenum Type> void OpenGLTexture<Type>::drawCropped(Dimensions const& orig, TexCoords const& tex) const {
|