[Bf-blender-cvs] [0d05315] master: Fix T43342 bad rendering of normal maps on NVIDIAs on the MacOS

Antony Riakiotakis noreply at git.blender.org
Tue Mar 10 23:09:01 CET 2015


Commit: 0d053158ecc27022af7aa184c0410b90cbc84980
Author: Antony Riakiotakis
Date:   Tue Mar 10 23:08:18 2015 +0100
Branches: master
https://developer.blender.org/rB0d053158ecc27022af7aa184c0410b90cbc84980

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.

===================================================================

M	source/blender/blenkernel/intern/cdderivedmesh.c

===================================================================

diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 2554151..447249c 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));




More information about the Bf-blender-cvs mailing list