From b11499939c7731e369be37c594142fd16e111ca7 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Fri, 14 May 2021 11:15:00 -0300 Subject: Python GPU: Replace part of the code that uses 'bgl' with 'gpu' This is part of the process described in T80730. The aim is to deprecate the bgl module. Reviewed By: fclem, brecht, campbellbarton Revision: D11147 --- intern/cycles/blender/addon/engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'intern/cycles/blender/addon/engine.py') diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py index dfa696714fb..d8398772a84 100644 --- a/intern/cycles/blender/addon/engine.py +++ b/intern/cycles/blender/addon/engine.py @@ -19,16 +19,16 @@ from __future__ import annotations def _is_using_buggy_driver(): - import bgl + import gpu # We need to be conservative here because in multi-GPU systems display card # might be quite old, but others one might be just good. # # So We shouldn't disable possible good dedicated cards just because display # card seems weak. And instead we only blacklist configurations which are # proven to cause problems. - if bgl.glGetString(bgl.GL_VENDOR) == "ATI Technologies Inc.": + if gpu.platform.vendor_get() == "ATI Technologies Inc.": import re - version = bgl.glGetString(bgl.GL_VERSION) + version = gpu.platform.version_get() if version.endswith("Compatibility Profile Context"): # Old HD 4xxx and 5xxx series drivers did not have driver version # in the version string, but those cards do not quite work and -- cgit v1.2.3