From d0beabb642ea8acb8e3d69aa3fc503ad703e7dfd Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Fri, 12 Apr 2013 17:56:07 +0000 Subject: Add function to query maximum texture size. Also, make texture upload functions aware of this limit. --- source/blender/windowmanager/intern/wm_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/windowmanager/intern/wm_draw.c') diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 444f8cc57c8..e437d7c0958 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -463,7 +463,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) for (x = 0; x < triple->nx; x++) { /* proxy texture is only guaranteed to test for the cases that * there is only one texture in use, which may not be the case */ - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); + maxsize = GPU_max_texture_size(); if (triple->x[x] > maxsize || triple->y[y] > maxsize) { glBindTexture(triple->target, 0); -- cgit v1.2.3