summaryrefslogtreecommitdiff
path: root/src/render/safeopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-14 02:17:38 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-14 11:41:50 +0300
commiteecd33fff488d54d038d84d8676000fad826e940 (patch)
tree9eb6c12810579d52c8df16e43d294852ba5613bb /src/render/safeopenglgraphics.cpp
parent4b8a6d93c5a785c673ec6c9f8a09880c48dee065 (diff)
downloadmanaplus-eecd33fff488d54d038d84d8676000fad826e940.tar.gz
manaplus-eecd33fff488d54d038d84d8676000fad826e940.tar.bz2
manaplus-eecd33fff488d54d038d84d8676000fad826e940.tar.xz
manaplus-eecd33fff488d54d038d84d8676000fad826e940.zip
fix modernoepngl drawing.
Add simple draw test in most renders.
Diffstat (limited to 'src/render/safeopenglgraphics.cpp')
-rw-r--r--src/render/safeopenglgraphics.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp
index 2fdc55e87..2027128ec 100644
--- a/src/render/safeopenglgraphics.cpp
+++ b/src/render/safeopenglgraphics.cpp
@@ -176,6 +176,32 @@ bool SafeOpenGLGraphics::drawImageInline(const Image *const image,
return true;
}
+void SafeOpenGLGraphics::testDraw()
+{
+ if (OpenGLImageHelper::mTextureType == GL_TEXTURE_2D)
+ {
+ glTexCoord2f(0.0f, 0.0f);
+ glVertex2i(0, 0);
+ glTexCoord2f(1.0f, 0.0f);
+ glVertex2i(800, 0);
+ glTexCoord2f(1.0f, 1.0f);
+ glVertex2i(800, 600);
+ glTexCoord2f(0.0f, 1.0f);
+ glVertex2i(0, 600);
+ }
+ else
+ {
+ glTexCoord2i(0, 0);
+ glVertex2i(0, 0);
+ glTexCoord2i(800, 0);
+ glVertex2i(800, 0);
+ glTexCoord2i(800, 600);
+ glVertex2i(800, 600);
+ glTexCoord2i(0, 600);
+ glVertex2i(0, 600);
+ }
+}
+
void SafeOpenGLGraphics::drawImageCached(const Image *const image,
int x, int y)
{