diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-11 23:17:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-11 23:17:58 +0300 |
commit | 4dbda55f670866db29a64ca7a79500efbe6f8d00 (patch) | |
tree | ddf806b499dcb4896568278b05defad1f27bcd06 /src/safeopenglgraphics.cpp | |
parent | fbb1186a319794dba7c23c466c07d6f45f940b8e (diff) | |
download | manaverse-4dbda55f670866db29a64ca7a79500efbe6f8d00.tar.gz manaverse-4dbda55f670866db29a64ca7a79500efbe6f8d00.tar.bz2 manaverse-4dbda55f670866db29a64ca7a79500efbe6f8d00.tar.xz manaverse-4dbda55f670866db29a64ca7a79500efbe6f8d00.zip |
Replace some getters to direct fileds using.
Diffstat (limited to 'src/safeopenglgraphics.cpp')
-rw-r--r-- | src/safeopenglgraphics.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/safeopenglgraphics.cpp b/src/safeopenglgraphics.cpp index c258298db..78210b7f8 100644 --- a/src/safeopenglgraphics.cpp +++ b/src/safeopenglgraphics.cpp @@ -76,13 +76,13 @@ static inline void drawQuad(const Image *image, { // Find OpenGL normalized texture coordinates. float texX1 = static_cast<float>(srcX) - / static_cast<float>(image->getTextureWidth()); + / static_cast<float>(image->mTexWidth); float texY1 = static_cast<float>(srcY) - / static_cast<float>(image->getTextureHeight()); + / static_cast<float>(image->mTexHeight); float texX2 = static_cast<float>(srcX + width) / static_cast<float>( - image->getTextureWidth()); + image->mTexWidth); float texY2 = static_cast<float>(srcY + height) / static_cast<float>( - image->getTextureHeight()); + image->mTexHeight); glTexCoord2f(texX1, texY1); glVertex2i(dstX, dstY); @@ -115,13 +115,13 @@ static inline void drawRescaledQuad(const Image *const image, { // Find OpenGL normalized texture coordinates. float texX1 = static_cast<float>(srcX) - / static_cast<float>(image->getTextureWidth()); + / static_cast<float>(image->mTexWidth); float texY1 = static_cast<float>(srcY) - / static_cast<float>(image->getTextureHeight()); + / static_cast<float>(image->mTexHeight); float texX2 = static_cast<float>(srcX + width) / static_cast<float>( - image->getTextureWidth()); + image->mTexWidth); float texY2 = static_cast<float>(srcY + height) / static_cast<float>( - image->getTextureHeight()); + image->mTexHeight); glTexCoord2f(texX1, texY1); glVertex2i(dstX, dstY); |