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.
This commit is contained in:
Antonis Ryakiotakis 2015-03-10 23:08:18 +01:00
parent 26d7b6c517
commit 0d053158ec
Notes: blender-bot 2023-02-14 09:35:32 +01:00
Referenced by issue #43342, bad viewport rendering normal map
1 changed files with 4 additions and 1 deletions

View File

@ -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));