From 06ad23dfdcfdf725e8e493df8640e388e5ecb869 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 31 May 2023 14:15:47 +0100 Subject: [PATCH] Ensure glVertexAttribDivisor is gles3 only Change-Id: Icb27671fea032fb00edfe8ff07808e2ab9e3b2eb --- dali/internal/graphics/gles-impl/gles-context.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dali/internal/graphics/gles-impl/gles-context.cpp b/dali/internal/graphics/gles-impl/gles-context.cpp index 073bf62..a073193 100644 --- a/dali/internal/graphics/gles-impl/gles-context.cpp +++ b/dali/internal/graphics/gles-impl/gles-context.cpp @@ -403,18 +403,21 @@ void Context::Flush(bool reset, const GLES::DrawCallDescriptor& drawCall, GLES:: reinterpret_cast(attr.offset)); } - switch(bufferBinding.inputRate) + if(hasGLES3) { - case Graphics::VertexInputRate::PER_VERTEX: + switch(bufferBinding.inputRate) { - gl.VertexAttribDivisor(attr.location, 0); - break; - } - case Graphics::VertexInputRate::PER_INSTANCE: - { - //@todo Get actual instance rate... - gl.VertexAttribDivisor(attr.location, 1); - break; + case Graphics::VertexInputRate::PER_VERTEX: + { + gl.VertexAttribDivisor(attr.location, 0); + break; + } + case Graphics::VertexInputRate::PER_INSTANCE: + { + //@todo Get actual instance rate... + gl.VertexAttribDivisor(attr.location, 1); + break; + } } } } -- 2.7.4