diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-09 20:04:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-09 20:27:19 +0300 |
commit | 820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc (patch) | |
tree | 78c2212ce15c202e12685d8a6dcce4a1937edea5 /src/resources/openglimagehelper.cpp | |
parent | 4ef3a45641bc2c1ada931951c120c4f8b8eb2301 (diff) | |
download | mv-820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc.tar.gz mv-820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc.tar.bz2 mv-820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc.tar.xz mv-820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc.zip |
Fix issue with DSO.
EXT and ARB extensions have bit different signatures.
Disable DSO black list for now.
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r-- | src/resources/openglimagehelper.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 111dbe58e..9e3e5dc2d 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -474,11 +474,24 @@ void OpenGLImageHelper::copySurfaceToImage(const Image *const image, if (!surface) return; - mglTextureSubImage2D(image->mGLImage, - mTextureType, 0, - x, y, - surface->w, surface->h, - GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels); + // +++ probably need combine + // mglTextureSubImage2D and mglTextureSubImage2DEXT + if (mglTextureSubImage2D) + { + mglTextureSubImage2D(image->mGLImage, + 0, + x, y, + surface->w, surface->h, + GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels); + } + else + { + mglTextureSubImage2DEXT(image->mGLImage, + mTextureType, 0, + x, y, + surface->w, surface->h, + GL_RGBA, GL_UNSIGNED_BYTE, surface->pixels); + } if (surface != oldSurface) MSDL_FreeSurface(surface); |