diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-10 01:25:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-10 01:25:12 +0300 |
commit | 98d8765769d809b060721bb071ca56887011a6b8 (patch) | |
tree | a58aae9dfc091fcc871cf7d6dbb295a5a958bed2 | |
parent | 42e4aaa2a7fb69376ccb470e1c219030093f578f (diff) | |
download | plus-98d8765769d809b060721bb071ca56887011a6b8.tar.gz plus-98d8765769d809b060721bb071ca56887011a6b8.tar.bz2 plus-98d8765769d809b060721bb071ca56887011a6b8.tar.xz plus-98d8765769d809b060721bb071ca56887011a6b8.zip |
Add support for OpenGL extension GL_ARB_clear_texture.
-rw-r--r-- | src/graphicsmanager.cpp | 13 | ||||
-rw-r--r-- | src/render/mgl.cpp | 2 | ||||
-rw-r--r-- | src/render/mgl.h | 2 | ||||
-rw-r--r-- | src/render/mgltypes.h | 5 |
4 files changed, 22 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index ed5983715..9b53de3e7 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -1065,14 +1065,26 @@ void GraphicsManager::initOpenGLFunctions() } if (is43 || supportExtension("GL_ARB_copy_image")) { + logger->log1("found GL_ARB_copy_image"); assignFunction(glCopyImageSubData); } else { logger->log1("GL_ARB_copy_image not found"); } + if (is44 || supportExtension("GL_ARB_clear_texture")) + { + logger->log1("found GL_ARB_clear_texture"); + assignFunction(glClearTexImage); + assignFunction(glClearTexSubImage); + } + else + { + logger->log1("GL_ARB_clear_texture not found"); + } if (is20 || supportExtension("GL_ARB_shader_objects")) { + logger->log1("found GL_ARB_shader_objects"); assignFunction(glCreateShader); assignFunction(glDeleteShader); assignFunction(glGetShaderiv); @@ -1100,6 +1112,7 @@ void GraphicsManager::initOpenGLFunctions() if (is30 || supportExtension("GL_EXT_gpu_shader4")) { + logger->log1("found GL_EXT_gpu_shader4"); assignFunction(glBindFragDataLocation); } else diff --git a/src/render/mgl.cpp b/src/render/mgl.cpp index c8de23997..27174a0c6 100644 --- a/src/render/mgl.cpp +++ b/src/render/mgl.cpp @@ -108,6 +108,8 @@ defName(glDeleteQueries); defName(glGetQueryObjectiv); defName(glGetQueryObjectui64v); defName(glTextureSubImage2D); +defName(glClearTexImage); +defName(glClearTexSubImage); #ifdef WIN32 defName(wglGetExtensionsString); diff --git a/src/render/mgl.h b/src/render/mgl.h index 705c66caa..d2ad570d9 100644 --- a/src/render/mgl.h +++ b/src/render/mgl.h @@ -111,6 +111,8 @@ defNameE(glDeleteQueries); defNameE(glGetQueryObjectiv); defNameE(glGetQueryObjectui64v); defNameE(glTextureSubImage2D); +defNameE(glClearTexImage); +defNameE(glClearTexSubImage); #ifdef WIN32 defNameE(wglGetExtensionsString); diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 24f1e8ca8..48ffbc34d 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -175,6 +175,11 @@ typedef void (APIENTRY *glGetQueryObjectui64v_t) (GLuint id, typedef void (APIENTRY *glTextureSubImage2D_t) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); +typedef void (APIENTRY *glClearTexImage_t) (GLuint texture, GLint level, + GLenum format, GLenum type, const void * data); +typedef void (APIENTRY *glClearTexSubImage_t) (GLuint texture, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, + GLsizei depth, GLenum format, GLenum type, const void * data); // callback typedef void (APIENTRY *GLDEBUGPROC_t) (GLenum source, GLenum type, GLuint id, |