From f139377a1a096582e5a7367696f307b1de7b8026 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 29 Oct 2012 16:26:18 +0000 Subject: Complete fix for [#33002] Wrong vertex color. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Appart from the color glitch, there was several problems with vpaint: * "fast_update" mode was never on, because of wrong testing code; * drawing refresh during stroke in "fast_update" (i.e. no dm rebuild) mode was broken in VBO mode, because updated (tess data) mcol wasn't moved to colors GPUBuffer. Solved the later point by adding a new DM_DIRTY_MCOL_UPDATE_DRAW flag to DerivedMesh dirty var, which is set each time vpaint stroke directly update me->mcol, and forces GPU_color_setup() to refresh the gpu's colors buffer. Also got rid of the uggly GPU_color3_upload(), which basically did the same thing, but with an additional intermediate buffer ! --- source/blender/gpu/GPU_buffers.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/gpu/GPU_buffers.h') diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index de83a717bce..f9183afd3ef 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -141,8 +141,6 @@ void *GPU_buffer_lock( GPUBuffer *buffer ); void *GPU_buffer_lock_stream( GPUBuffer *buffer ); void GPU_buffer_unlock( GPUBuffer *buffer ); -/* upload three unsigned chars, representing RGB colors, for each vertex. Resets dm->drawObject->colType to -1 */ -void GPU_color3_upload(struct DerivedMesh *dm, unsigned char *data ); /* switch color rendering on=1/off=0 */ void GPU_color_switch( int mode ); -- cgit v1.2.3