summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-09-12 12:10:03 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-09-12 12:39:05 +0100
commit3f03499bf8a7cf3c3f8d19a020179c1205980bde (patch)
tree518b0ef3fb1b31d3856f43124150ef41acb8c1aa /src/render/graphicshelpers/graphicscontext.cpp
parent8a4b9ebadb9e63ae367694f04786c7faf6306f27 (diff)
parentbf5fd7a78c91e29332ce70ad844b756150f32f18 (diff)
Merge branch '5.9' into 5.10
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index 37182a0ba..11132c5ed 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -1462,7 +1462,7 @@ void GraphicsContext::specifyAttribute(const Attribute *attribute,
attr.dataType = attributeDataType;
attr.byteOffset = attribute->byteOffset() + (i * attrCount * typeSize);
attr.vertexSize = attribute->vertexSize() / attrCount;
- attr.byteStride = attribute->byteStride() + (attrCount * attrCount * typeSize);
+ attr.byteStride = (attribute->byteStride() != 0) ? attribute->byteStride() : (attrCount * attrCount * typeSize);
attr.divisor = attribute->divisor();
attr.shaderDataType = attributeDescription->m_type;