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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-05-11 00:36:34 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-05-11 00:36:34 +0400
commitd35d0e38ce3ab421880b01fe5e80cb61a1323c45 (patch)
tree7f650bd41784e9d305741629eee223cc142978f2 /source/blender/blenlib
parent3ee0305ebb45e3e48ccab69d952ec4258b3dc881 (diff)
Add mask-drawing support to GPU_Buffers.
This is the last commit of the sculpt masking merge. Documentation: http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks Thanks to Brecht for reviewing! * For VBO, add color to the VertexBufferFormat structure as three unsigned bytes. Since mask elements are scalar the three color components are identical to eachother, but the fixed-function OpenGL pipeline requires colors to be either three or four components. * For the same reason, multires VBO drawing now copies into the VertexBufferFormat format as well. * Regression: material colors will not show up correctly now, masks colors are overriding. Not sure how to fix this nicely (would be much easier to fix if drawing with vertex shaders.) * Also, masks will only draw PBVH drawing, so only 'solid' drawing will work correctly with masks.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/pbvh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c
index c157ba7b575..759e93c9b40 100644
--- a/source/blender/blenlib/intern/pbvh.c
+++ b/source/blender/blenlib/intern/pbvh.c
@@ -1169,7 +1169,9 @@ static void pbvh_update_draw_buffers(PBVH *bvh, PBVHNode **nodes, int totnode)
bvh->verts,
node->vert_indices,
node->uniq_verts +
- node->face_verts);
+ node->face_verts,
+ CustomData_get_layer(bvh->vdata,
+ CD_PAINT_MASK));
break;
}