From 6a03f147f6194a9329e5ae8ad9a0a55271f6660c Mon Sep 17 00:00:00 2001 From: Deve Date: Tue, 22 Aug 2017 00:02:34 +0200 Subject: [PATCH] Add a possibility to use ubo on gles. Disabled by default on android, because it's been tested on only one device and it's a bit slower in most cases. --- data/graphical_restrictions.xml | 1 + src/graphics/central_settings.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/data/graphical_restrictions.xml b/data/graphical_restrictions.xml index f9db1ec2f..999b5520a 100644 --- a/data/graphical_restrictions.xml +++ b/data/graphical_restrictions.xml @@ -39,4 +39,5 @@ + diff --git a/src/graphics/central_settings.cpp b/src/graphics/central_settings.cpp index f6e8127cc..a7925643a 100644 --- a/src/graphics/central_settings.cpp +++ b/src/graphics/central_settings.cpp @@ -252,6 +252,13 @@ void CentralVideoSettings::init() Log::info("GLDriver", "Explicit Attrib Location Present"); hasExplicitAttribLocation = true; } + + if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_UNIFORM_BUFFER_OBJECT) && + m_glsl == true) + { + hasUBO = true; + Log::info("GLDriver", "ARB Uniform Buffer Object Present"); + } if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_TEXTURE_FORMAT_BGRA8888) && (hasGLExtension("GL_IMG_texture_format_BGRA8888") ||