From d0432e0abdd05cf96741c0b5a88c8060243ff14a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Jul 2014 23:05:08 +0300 Subject: Use GL_EXT_direct_state_access in copy to texture function. --- src/resources/openglimagehelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 27d0e9956..18a220f01 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -388,8 +388,8 @@ void OpenGLImageHelper::copySurfaceToImage(Image *const image, SDL_Surface *const oldSurface = surface; surface = convertSurface(surface, surface->w, surface->h); - bindTexture(image->mGLImage); - glTexSubImage2D(mTextureType, 0, + mglTextureSubImage2D(image->mGLImage, + mTextureType, 0, x, y, surface->w, surface->h, GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels); -- cgit v1.2.3-70-g09d2