From 820ed443d5c96fb96cdc7b1f945ac7c6aaf95cbc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 May 2016 20:04:16 +0300 Subject: Fix issue with DSO. EXT and ARB extensions have bit different signatures. Disable DSO black list for now. --- src/resources/openglimagehelper.cpp | 23 ++++++++++++++++++----- src/resources/safeopenglimagehelper.cpp | 23 ++++++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) (limited to 'src/resources') 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); diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp index 41b2c5d89..c57e2a104 100644 --- a/src/resources/safeopenglimagehelper.cpp +++ b/src/resources/safeopenglimagehelper.cpp @@ -473,11 +473,24 @@ void SafeOpenGLImageHelper::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); -- cgit v1.2.3-70-g09d2