summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-07-28 00:06:08 +0300
committerJared Adams <jaxad0127@gmail.com>2010-07-27 16:00:12 -0600
commit04cefb857e2738c103b81f8ac1502f344d84c16f (patch)
tree7da1e5b6c981485f32833c262c4c136f88612bac /src/resources
parent0875b7ecb46f93e408a560f0033da392f0a4d3b2 (diff)
downloadmana-04cefb857e2738c103b81f8ac1502f344d84c16f.tar.gz
mana-04cefb857e2738c103b81f8ac1502f344d84c16f.tar.bz2
mana-04cefb857e2738c103b81f8ac1502f344d84c16f.tar.xz
mana-04cefb857e2738c103b81f8ac1502f344d84c16f.zip
Improve OpenGL speed.
Use batch commands and not selecting already selected texture. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 0e7dc897..82799bce 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -22,6 +22,11 @@
#include "resources/image.h"
#include "resources/dye.h"
+
+#ifdef USE_OPENGL
+#include "openglgraphics.h"
+#endif
+
#include "log.h"
#include <SDL_image.h>
@@ -467,7 +472,7 @@ Image *Image::_GLload(SDL_Surface *tmpImage)
GLuint texture;
glGenTextures(1, &texture);
- glBindTexture(mTextureType, texture);
+ OpenGLGraphics::bindTexture(mTextureType, texture);
if (SDL_MUSTLOCK(tmpImage))
SDL_LockSurface(tmpImage);