From 9046c292f80552f0733411db886b1c092fd44ed4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Dec 2012 11:17:20 +0000 Subject: fix [#33598] Regression in 2.65 while opening a 2.64 file VBO's were using a material limit half the size of the rest of blender. --- source/blender/gpu/intern/gpu_buffers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern') diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 6e475ace09d..daf97c4841f 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -45,6 +45,7 @@ #include "BLI_threads.h" #include "DNA_meshdata_types.h" +#include "DNA_material_types.h" #include "BKE_ccg.h" #include "BKE_DerivedMesh.h" @@ -66,8 +67,8 @@ typedef enum { #define MAX_GPU_ATTRIB_DATA 32 -/* material number is an 16-bit short and the range of short is from -16383 to 16383 (assume material number is non-negative) */ -#define MAX_MATERIALS 16384 +/* material number is an 16-bit signed short and the range (assume material number is non-negative) */ +#define MAX_MATERIALS MAXMAT /* -1 - undefined, 0 - vertex arrays, 1 - VBOs */ static int useVBOs = -1; -- cgit v1.2.3