summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2016-05-03 21:26:04 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-05-04 15:33:03 +0000
commit333a10969112566c78e1725472ca07edb73c5e2a (patch)
treefa5f46776c754d5b3d090ed803804ca054613965
parent7fa8b1523a0791a159c594687c89af7ae621752a (diff)
Add firstVertex to QGeometryRenderer API
To support glDrawArraysInstancedBaseInstance Task-number: QTBUG-51515 Change-Id: I0c95b351ff7a3668f17256d0d875c3c36537fd01 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/render/backend/renderer.cpp9
-rw-r--r--src/render/geometry/geometryrenderer.cpp6
-rw-r--r--src/render/geometry/geometryrenderer_p.h2
-rw-r--r--src/render/geometry/qgeometryrenderer.cpp29
-rw-r--r--src/render/geometry/qgeometryrenderer.h4
-rw-r--r--src/render/geometry/qgeometryrenderer_p.h2
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp9
-rw-r--r--src/render/graphicshelpers/graphicscontext_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelperes2.cpp10
-rw-r--r--src/render/graphicshelpers/graphicshelperes2_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2.cpp10
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3.cpp10
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3.cpp10
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp9
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelperinterface_p.h1
19 files changed, 113 insertions, 4 deletions
diff --git a/src/render/backend/renderer.cpp b/src/render/backend/renderer.cpp
index cd7380ba4..f7b176d10 100644
--- a/src/render/backend/renderer.cpp
+++ b/src/render/backend/renderer.cpp
@@ -891,10 +891,11 @@ void Renderer::performDraw(GeometryRenderer *rGeometryRenderer, GLsizei primitiv
rGeometryRenderer->instanceCount(),
rGeometryRenderer->indexOffset());
else
- m_graphicsContext->drawArraysInstanced(primType,
- rGeometryRenderer->firstInstance(),
- primitiveCount,
- rGeometryRenderer->instanceCount());
+ m_graphicsContext->drawArraysInstancedBaseInstance(primType,
+ rGeometryRenderer->firstInstance(),
+ primitiveCount,
+ rGeometryRenderer->instanceCount(),
+ rGeometryRenderer->firstVertex());
#if defined(QT3D_RENDER_ASPECT_OPENGL_DEBUG)
int err = m_graphicsContext->openGLContext()->functions()->glGetError();
diff --git a/src/render/geometry/geometryrenderer.cpp b/src/render/geometry/geometryrenderer.cpp
index bc89a968c..da8b1aca0 100644
--- a/src/render/geometry/geometryrenderer.cpp
+++ b/src/render/geometry/geometryrenderer.cpp
@@ -63,6 +63,7 @@ GeometryRenderer::GeometryRenderer()
, m_vertexCount(0)
, m_indexOffset(0)
, m_firstInstance(0)
+ , m_firstVertex(0)
, m_restartIndexValue(-1)
, m_verticesPerPatch(0)
, m_primitiveRestartEnabled(false)
@@ -83,6 +84,7 @@ void GeometryRenderer::cleanup()
m_vertexCount = 0;
m_indexOffset = 0;
m_firstInstance = 0;
+ m_firstVertex = 0;
m_restartIndexValue = -1;
m_verticesPerPatch = 0;
m_primitiveRestartEnabled = false;
@@ -108,6 +110,7 @@ void GeometryRenderer::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBase
m_vertexCount = data.vertexCount;
m_indexOffset = data.indexOffset;
m_firstInstance = data.firstInstance;
+ m_firstVertex = data.firstVertex;
m_restartIndexValue = data.restartIndexValue;
m_verticesPerPatch = data.verticesPerPatch;
m_primitiveRestartEnabled = data.primitiveRestart;
@@ -140,6 +143,9 @@ void GeometryRenderer::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e)
} else if (propertyName == QByteArrayLiteral("firstInstance")) {
m_firstInstance = propertyChange->value().value<int>();
m_dirty = true;
+ } else if (propertyName == QByteArrayLiteral("firstVertex")) {
+ m_firstVertex = propertyChange->value().value<int>();
+ m_dirty = true;
} else if (propertyName == QByteArrayLiteral("restartIndexValue")) {
m_restartIndexValue = propertyChange->value().value<int>();
m_dirty = true;
diff --git a/src/render/geometry/geometryrenderer_p.h b/src/render/geometry/geometryrenderer_p.h
index 640840962..3399e6f70 100644
--- a/src/render/geometry/geometryrenderer_p.h
+++ b/src/render/geometry/geometryrenderer_p.h
@@ -81,6 +81,7 @@ public:
inline int vertexCount() const { return m_vertexCount; }
inline int indexOffset() const { return m_indexOffset; }
inline int firstInstance() const { return m_firstInstance; }
+ inline int firstVertex() const { return m_firstVertex; }
inline int restartIndexValue() const { return m_restartIndexValue; }
inline int verticesPerPatch() const { return m_verticesPerPatch; }
inline bool primitiveRestartEnabled() const { return m_primitiveRestartEnabled; }
@@ -102,6 +103,7 @@ private:
int m_vertexCount;
int m_indexOffset;
int m_firstInstance;
+ int m_firstVertex;
int m_restartIndexValue;
int m_verticesPerPatch;
bool m_primitiveRestartEnabled;
diff --git a/src/render/geometry/qgeometryrenderer.cpp b/src/render/geometry/qgeometryrenderer.cpp
index 716417bc5..87ca16f11 100644
--- a/src/render/geometry/qgeometryrenderer.cpp
+++ b/src/render/geometry/qgeometryrenderer.cpp
@@ -57,6 +57,7 @@ QGeometryRendererPrivate::QGeometryRendererPrivate()
, m_vertexCount(0)
, m_indexOffset(0)
, m_firstInstance(0)
+ , m_firstVertex(0)
, m_restartIndexValue(-1)
, m_verticesPerPatch(0)
, m_primitiveRestart(false)
@@ -92,6 +93,12 @@ QGeometryRendererPrivate::QGeometryRendererPrivate()
/*!
* \qmlproperty int GeometryRenderer::firstInstance
*
+ * Holds the first vertex.
+ */
+
+/*!
+ * \qmlproperty int GeometryRenderer::firstVertex
+ *
* Holds the base instance.
*/
@@ -213,6 +220,17 @@ int QGeometryRenderer::firstInstance() const
}
/*!
+ * \property QGeometryRenderer::firstVertex
+ *
+ * Holds the base vertex.
+ */
+int QGeometryRenderer::firstVertex() const
+{
+ Q_D(const QGeometryRenderer);
+ return d->m_firstVertex;
+}
+
+/*!
* \property QGeometryRenderer::restartIndex
*
* Holds the restart index.
@@ -316,6 +334,16 @@ void QGeometryRenderer::setFirstInstance(int firstInstance)
emit firstInstanceChanged(firstInstance);
}
+void QGeometryRenderer::setFirstVertex(int firstVertex)
+{
+ Q_D(QGeometryRenderer);
+ if (d->m_firstVertex == firstVertex)
+ return;
+
+ d->m_firstVertex = firstVertex;
+ emit firstVertexChanged(firstVertex);
+}
+
void QGeometryRenderer::setRestartIndexValue(int index)
{
Q_D(QGeometryRenderer);
@@ -423,6 +451,7 @@ Qt3DCore::QNodeCreatedChangeBasePtr QGeometryRenderer::createNodeCreationChange(
data.vertexCount = d->m_vertexCount;
data.indexOffset = d->m_indexOffset;
data.firstInstance = d->m_firstInstance;
+ data.firstVertex = d->m_firstVertex;
data.restartIndexValue = d->m_restartIndexValue;
data.verticesPerPatch = d->m_verticesPerPatch;
data.primitiveRestart = d->m_primitiveRestart;
diff --git a/src/render/geometry/qgeometryrenderer.h b/src/render/geometry/qgeometryrenderer.h
index a6d211c7a..cc4560921 100644
--- a/src/render/geometry/qgeometryrenderer.h
+++ b/src/render/geometry/qgeometryrenderer.h
@@ -60,6 +60,7 @@ class QT3DRENDERSHARED_EXPORT QGeometryRenderer : public Qt3DCore::QComponent
Q_PROPERTY(int vertexCount READ vertexCount WRITE setVertexCount NOTIFY vertexCountChanged)
Q_PROPERTY(int indexOffset READ indexOffset WRITE setIndexOffset NOTIFY indexOffsetChanged)
Q_PROPERTY(int firstInstance READ firstInstance WRITE setFirstInstance NOTIFY firstInstanceChanged)
+ Q_PROPERTY(int firstVertex READ firstVertex WRITE setFirstVertex NOTIFY firstVertexChanged)
Q_PROPERTY(int restartIndexValue READ restartIndexValue WRITE setRestartIndexValue NOTIFY restartIndexValueChanged)
Q_PROPERTY(int verticesPerPatch READ verticesPerPatch WRITE setVerticesPerPatch NOTIFY verticesPerPatchChanged)
Q_PROPERTY(bool primitiveRestartEnabled READ primitiveRestartEnabled WRITE setPrimitiveRestartEnabled NOTIFY primitiveRestartEnabledChanged)
@@ -92,6 +93,7 @@ public:
int vertexCount() const;
int indexOffset() const;
int firstInstance() const;
+ int firstVertex() const;
int restartIndexValue() const;
int verticesPerPatch() const;
bool primitiveRestartEnabled() const;
@@ -106,6 +108,7 @@ public Q_SLOTS:
void setVertexCount(int vertexCount);
void setIndexOffset(int indexOffset);
void setFirstInstance(int firstInstance);
+ void setFirstVertex(int firstVertex);
void setRestartIndexValue(int index);
void setVerticesPerPatch(int verticesPerPatch);
void setPrimitiveRestartEnabled(bool enabled);
@@ -117,6 +120,7 @@ Q_SIGNALS:
void vertexCountChanged(int vertexCount);
void indexOffsetChanged(int indexOffset);
void firstInstanceChanged(int firstInstance);
+ void firstVertexChanged(int firstVertex);
void restartIndexValueChanged(int restartIndexValue);
void verticesPerPatchChanged(int verticesPerPatch);
void primitiveRestartEnabledChanged(bool primitiveRestartEnabled);
diff --git a/src/render/geometry/qgeometryrenderer_p.h b/src/render/geometry/qgeometryrenderer_p.h
index 3341a7758..465c7fdca 100644
--- a/src/render/geometry/qgeometryrenderer_p.h
+++ b/src/render/geometry/qgeometryrenderer_p.h
@@ -71,6 +71,7 @@ public:
int m_vertexCount;
int m_indexOffset;
int m_firstInstance;
+ int m_firstVertex;
int m_restartIndexValue;
int m_verticesPerPatch;
bool m_primitiveRestart;
@@ -85,6 +86,7 @@ struct QGeometryRendererData
int vertexCount;
int indexOffset;
int firstInstance;
+ int firstVertex;
int restartIndexValue;
int verticesPerPatch;
bool primitiveRestart;
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index baad5a714..783ab2348 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -728,6 +728,15 @@ void GraphicsContext::drawArraysInstanced(GLenum primitiveType,
instances);
}
+void GraphicsContext::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseinstance)
+{
+ m_glHelper->drawArraysInstancedBaseInstance(primitiveType,
+ first,
+ count,
+ instances,
+ baseinstance);
+}
+
/*!
* Wraps an OpenGL call to glDrawElements.
*/
diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h
index 37cedcd5a..0c9709dd1 100644
--- a/src/render/graphicshelpers/graphicscontext_p.h
+++ b/src/render/graphicshelpers/graphicscontext_p.h
@@ -198,6 +198,7 @@ public:
void dispatchCompute(int x, int y, int z);
void drawArrays(GLenum primitiveType, GLint first, GLsizei count);
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances);
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseinstance);
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void * indices, GLint baseVertex = 0);
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void * indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0);
void enableClipPlane(int clipPlane);
diff --git a/src/render/graphicshelpers/graphicshelperes2.cpp b/src/render/graphicshelpers/graphicshelperes2.cpp
index 28ea181b6..4b84bfbad 100644
--- a/src/render/graphicshelpers/graphicshelperes2.cpp
+++ b/src/render/graphicshelpers/graphicshelperes2.cpp
@@ -115,6 +115,16 @@ void GraphicsHelperES2::drawArraysInstanced(GLenum primitiveType,
count);
}
+void GraphicsHelperES2::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance)
+{
+ if (baseInstance != 0)
+ qWarning() << "glDrawArraysInstancedBaseInstance is not supported with OpenGL ES 2";
+ for (GLint i = 0; i < instances; i++)
+ drawArrays(primitiveType,
+ first,
+ count);
+}
+
void GraphicsHelperES2::drawElements(GLenum primitiveType,
GLsizei primitiveCount,
GLint indexType,
diff --git a/src/render/graphicshelpers/graphicshelperes2_p.h b/src/render/graphicshelpers/graphicshelperes2_p.h
index ae53c9d81..22bd00307 100644
--- a/src/render/graphicshelpers/graphicshelperes2_p.h
+++ b/src/render/graphicshelpers/graphicshelperes2_p.h
@@ -91,6 +91,7 @@ public:
void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) Q_DECL_OVERRIDE;
void drawArrays(GLenum primitiveType, GLint first, GLsizei count) Q_DECL_OVERRIDE;
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) Q_DECL_OVERRIDE;
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) Q_DECL_OVERRIDE;
void drawBuffers(GLsizei n, const int *bufs) Q_DECL_OVERRIDE;
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0) Q_DECL_OVERRIDE;
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl2.cpp b/src/render/graphicshelpers/graphicshelpergl2.cpp
index 58529fc54..3e283ca7e 100644
--- a/src/render/graphicshelpers/graphicshelpergl2.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl2.cpp
@@ -105,6 +105,16 @@ void GraphicsHelperGL2::drawArraysInstanced(GLenum primitiveType,
count);
}
+void GraphicsHelperGL2::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance)
+{
+ if (baseInstance != 0)
+ qWarning() << "glDrawArraysInstancedBaseInstance is not supported with OpenGL 2";
+ for (GLint i = 0; i < instances; i++)
+ drawArrays(primitiveType,
+ first,
+ count);
+}
+
void GraphicsHelperGL2::drawElements(GLenum primitiveType,
GLsizei primitiveCount,
GLint indexType,
diff --git a/src/render/graphicshelpers/graphicshelpergl2_p.h b/src/render/graphicshelpers/graphicshelpergl2_p.h
index ab3993896..1256ebe25 100644
--- a/src/render/graphicshelpers/graphicshelpergl2_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl2_p.h
@@ -93,6 +93,7 @@ public:
void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) Q_DECL_OVERRIDE;
void drawArrays(GLenum primitiveType, GLint first, GLsizei count) Q_DECL_OVERRIDE;
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) Q_DECL_OVERRIDE;
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) Q_DECL_OVERRIDE;
void drawBuffers(GLsizei n, const int *bufs) Q_DECL_OVERRIDE;
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0) Q_DECL_OVERRIDE;
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl3.cpp b/src/render/graphicshelpers/graphicshelpergl3.cpp
index 1d4282b29..791e7bf9a 100644
--- a/src/render/graphicshelpers/graphicshelpergl3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3.cpp
@@ -123,6 +123,16 @@ void GraphicsHelperGL3::drawArraysInstanced(GLenum primitiveType,
instances);
}
+void GraphicsHelperGL3::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance)
+{
+ if (baseInstance != 0)
+ qWarning() << "glDrawArraysInstancedBaseInstance is not supported with OpenGL 3";
+ m_funcs->glDrawArraysInstanced(primitiveType,
+ first,
+ count,
+ instances);
+}
+
void GraphicsHelperGL3::drawElements(GLenum primitiveType,
GLsizei primitiveCount,
GLint indexType,
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
index ecdf564bb..99f070ab7 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
@@ -122,6 +122,16 @@ void GraphicsHelperGL3_3::drawArraysInstanced(GLenum primitiveType,
instances);
}
+void GraphicsHelperGL3_3::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance)
+{
+ if (baseInstance != 0)
+ qWarning() << "glDrawArraysInstancedBaseInstance is not supported with OpenGL 3";
+ m_funcs->glDrawArraysInstanced(primitiveType,
+ first,
+ count,
+ instances);
+}
+
void GraphicsHelperGL3_3::drawElements(GLenum primitiveType,
GLsizei primitiveCount,
GLint indexType,
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3_p.h b/src/render/graphicshelpers/graphicshelpergl3_3_p.h
index def34df85..b9c074040 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl3_3_p.h
@@ -94,6 +94,7 @@ public:
void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) Q_DECL_OVERRIDE;
void drawArrays(GLenum primitiveType, GLint first, GLsizei count) Q_DECL_OVERRIDE;
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) Q_DECL_OVERRIDE;
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) Q_DECL_OVERRIDE;
void drawBuffers(GLsizei n, const int *bufs) Q_DECL_OVERRIDE;
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0) Q_DECL_OVERRIDE;
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl3_p.h b/src/render/graphicshelpers/graphicshelpergl3_p.h
index 9c70d34fa..5379c24aa 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl3_p.h
@@ -94,6 +94,7 @@ public:
void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) Q_DECL_OVERRIDE;
void drawArrays(GLenum primitiveType, GLint first, GLsizei count) Q_DECL_OVERRIDE;
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) Q_DECL_OVERRIDE;
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) Q_DECL_OVERRIDE;
void drawBuffers(GLsizei n, const int *bufs) Q_DECL_OVERRIDE;
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0) Q_DECL_OVERRIDE;
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index f8f41aabb..04e409263 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -118,6 +118,15 @@ void GraphicsHelperGL4::drawArraysInstanced(GLenum primitiveType,
instances);
}
+void GraphicsHelperGL4::drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance)
+{
+ m_funcs->glDrawArraysInstancedBaseInstance(primitiveType,
+ first,
+ count,
+ instances,
+ baseInstance);
+}
+
void GraphicsHelperGL4::drawElements(GLenum primitiveType,
GLsizei primitiveCount,
GLint indexType,
diff --git a/src/render/graphicshelpers/graphicshelpergl4_p.h b/src/render/graphicshelpers/graphicshelpergl4_p.h
index 4574e7e0f..f00e97fd5 100644
--- a/src/render/graphicshelpers/graphicshelpergl4_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl4_p.h
@@ -93,6 +93,7 @@ public:
void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) Q_DECL_OVERRIDE;
void drawArrays(GLenum primitiveType, GLint first, GLsizei count) Q_DECL_OVERRIDE;
void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) Q_DECL_OVERRIDE;
+ void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseInstance) Q_DECL_OVERRIDE;
void drawBuffers(GLsizei n, const int *bufs) Q_DECL_OVERRIDE;
void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLint baseVertex = 0) Q_DECL_OVERRIDE;
void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void *indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelperinterface_p.h b/src/render/graphicshelpers/graphicshelperinterface_p.h
index 16381d024..1eca84b90 100644
--- a/src/render/graphicshelpers/graphicshelperinterface_p.h
+++ b/src/render/graphicshelpers/graphicshelperinterface_p.h
@@ -104,6 +104,7 @@ public:
virtual void dispatchCompute(GLuint wx, GLuint wy, GLuint wz) = 0;
virtual void drawArrays(GLenum primitiveType, GLint first, GLsizei count) = 0;
virtual void drawArraysInstanced(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances) = 0;
+ virtual void drawArraysInstancedBaseInstance(GLenum primitiveType, GLint first, GLsizei count, GLsizei instances, GLsizei baseinstance) = 0;
virtual void drawBuffers(GLsizei n, const int *bufs) = 0;
virtual void drawElements(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void * indices, GLint baseVertex = 0) = 0;
virtual void drawElementsInstanced(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void * indices, GLsizei instances, GLint baseVertex = 0, GLint baseInstance = 0) = 0;