summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp4
1 files 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);