From 98abc793f8fb45d647e1e8c51cf5f38170c6b703 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Jul 2010 00:06:08 +0300 Subject: Improve OpenGL speed. Use batch commands and not selecting already selected texture. Signed-off-by: Jared Adams --- src/resources/image.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/resources') 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 @@ -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); -- cgit v1.2.3-70-g09d2