diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index ff4e86b2e2..74ea9d4842 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -571,17 +571,9 @@ reset() { _supports_multitexture = false; - _supports_vertex_arrays = true; - if (_gl_version.find("1.2 (1.5 Mesa 6.",0) != string::npos) { - if (_gl_renderer.find("Mesa ") == 0) { - // We suspect this particular version of Mesa, which appears to - // be installed by default on every Linux implementation, has - // real problems rendering with vertex arrays. Therefore, - // disable vertex arrays by default. - GLCAT.debug() - << "Buggy Mesa version detected; vertex array support is doubted.\n"; - _supports_vertex_arrays = false; - } + _supports_mesa_6 = false; + if (_gl_version.find("Mesa 6.",0) != string::npos) { + _supports_mesa_6 = true; } _supports_tex_non_pow2 = @@ -1715,7 +1707,8 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, // extra vertex arrays used by the previous rendering mode. #ifdef SUPPORT_IMMEDIATE_MODE _use_sender = !vertex_arrays; - if (!_supports_vertex_arrays) { + // This is a workaround for a bug in Mesa 6 vertex array handling. + if ((_supports_mesa_6) && (_current_properties->get_force_software())) { _use_sender = true; } #endif diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index a19d84cbe0..795ebf3c45 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -423,7 +423,7 @@ public: bool _supports_bgr; bool _supports_rescale_normal; - bool _supports_vertex_arrays; + bool _supports_mesa_6; bool _supports_multitexture; PFNGLACTIVETEXTUREPROC _glActiveTexture;