diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-04 21:10:57 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-04 21:10:57 +0400 |
commit | 4a7f37f6ed3569b12ff195081cca3f31430bef67 (patch) | |
tree | 3ddd670c4688e43f30b0ad92508eb7995aecbf91 /source/blender | |
parent | 855cfc210e42880fd5795d16ee7432a6f5e96e5b (diff) |
Fix #35602: VBO + dynamic topology sculpt did not show specularity.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index ff48e273619..1b1d52728e8 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -2311,6 +2311,8 @@ static void gpu_draw_buffers_legacy_grids(GPU_Buffers *buffers) void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial, int wireframe) { + /* sets material from the first face, to solve properly face would need to + * be sorted in buckets by materials */ if (buffers->totface) { const MFace *f = &buffers->mface[buffers->face_indices[0]]; if (!setMaterial(f->mat_nr + 1, NULL)) @@ -2321,6 +2323,10 @@ void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial, if (!setMaterial(f->mat_nr + 1, NULL)) return; } + else { + if (!setMaterial(1, NULL)) + return; + } glShadeModel((buffers->smooth || buffers->totface) ? GL_SMOOTH : GL_FLAT); |