From 712098b1c8faa0aa39ce313ee55c513b6c8547c2 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Fri, 17 Jul 2015 19:12:04 +0200 Subject: Fix GLSL code not working correctly for Macs without VBO, again report by scorpion81 on irc --- source/blender/blenkernel/intern/cdderivedmesh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 9c2577193ce..9c3102aced5 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -872,7 +872,8 @@ static void cdDM_drawMappedFacesGLSL( glShadeModel(GL_SMOOTH); /* workaround for NVIDIA GPUs on Mac not supporting vertex arrays + interleaved formats, see T43342 */ - if ((GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY) && (U.gameflags & USER_DISABLE_VBO)) || + //GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_MAC, GPU_DRIVER_ANY) && + if (((U.gameflags & USER_DISABLE_VBO)) || setDrawOptions != NULL) { DMVertexAttribs attribs; @@ -892,7 +893,8 @@ static void cdDM_drawMappedFacesGLSL( if (new_matnr != matnr) { glEnd(); - do_draw = setMaterial(matnr = new_matnr, &gattribs); + matnr = new_matnr; + do_draw = setMaterial(matnr + 1, &gattribs); if (do_draw) DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs); -- cgit v1.2.3