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:
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user