Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 7ac852f551a..dfd4b5f2b83 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -79,6 +79,7 @@ typedef struct GPUShaders {
} GPUShaders;
static struct GPUGlobal {
+ GLint maxtexsize;
GLint maxtextures;
GLuint currentfb;
int glslsupport;
@@ -107,6 +108,11 @@ void GPU_extensions_disable(void)
GG.extdisabled = 1;
}
+int GPU_max_texture_size ()
+{
+ return GG.maxtexsize;
+}
+
void GPU_extensions_init(void)
{
GLint r, g, b;
@@ -124,6 +130,8 @@ void GPU_extensions_init(void)
if (GLEW_ARB_multitexture)
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &GG.maxtextures);
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &GG.maxtexsize);
+
GG.glslsupport = 1;
if (!GLEW_ARB_multitexture) GG.glslsupport = 0;
if (!GLEW_ARB_vertex_shader) GG.glslsupport = 0;