diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-11 01:08:18 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-11 01:08:43 +0300 |
commit | 0d053158ecc27022af7aa184c0410b90cbc84980 (patch) | |
tree | 0ef87677509bb9b2d3c725533cd16c9d9cb7eba9 | |
parent | 26d7b6c51792e0b601ae24e88308eaefb66e3b8b (diff) |
Fix T43342 bad rendering of normal maps on NVIDIAs on the MacOS
This is not limited to normal maps, it's just that normal maps cause a
mix of interleaved vertex arrays + non interleaved vertex arrays + GLSL,
which could confuse the GL. Possible explanation is that it may be
clobbering the vertex index of the shader somehow but this is difficult
to know without extensive tests and the Mac is needed by Francesco in
the morning :).
Do brute force solution instead, just force legacy drawing on Macs when
VBOs is off. On the plus side VBOs work fine, so we should be fine when
we update.
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 2554151c99d..447249cc990 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -927,7 +927,10 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, glShadeModel(GL_SMOOTH); - if (setDrawOptions != NULL) { + /* 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)) || + setDrawOptions != NULL) + { DEBUG_VBO("Using legacy code. cdDM_drawMappedFacesGLSL\n"); memset(&attribs, 0, sizeof(attribs)); |