summaryrefslogtreecommitdiff
path: root/src/resources/openglimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-15 01:37:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-15 01:37:01 +0300
commit0f208c6842ef13d8c68b179eb0ab88a37a0926b0 (patch)
treedc60df46116896fc362ac5067fbc464982ee2cc9 /src/resources/openglimagehelper.cpp
parent8f9ffaa42e6fa11bb963fa9f1a1824d85a50b51b (diff)
downloadmv-0f208c6842ef13d8c68b179eb0ab88a37a0926b0.tar.gz
mv-0f208c6842ef13d8c68b179eb0ab88a37a0926b0.tar.bz2
mv-0f208c6842ef13d8c68b179eb0ab88a37a0926b0.tar.xz
mv-0f208c6842ef13d8c68b179eb0ab88a37a0926b0.zip
Add OpenGL extension GL_ARB_invalidate_subdata.
And use it for invalidate prepared for deletion images.
Diffstat (limited to 'src/resources/openglimagehelper.cpp')
-rw-r--r--src/resources/openglimagehelper.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 2ce4bd405..2eadf35ff 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -348,4 +348,13 @@ void OpenGLImageHelper::postInit()
glGenTextures(texturesSize, &mTextures[mFreeTextureIndex]);
}
+void OpenGLImageHelper::invalidate(const GLuint textureId)
+{
+ if (mglInvalidateTexImage)
+ {
+ logger->log("invalidate: %u", textureId);
+ mglInvalidateTexImage(textureId, 0);
+ }
+}
+
#endif