diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-10-03 14:51:54 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2017-01-13 09:41:50 +0000 |
commit | beb138bb3e3cb13a049e317cf6e56cdd5479ec0d (patch) | |
tree | 32b3aea2bc5abef25a6a48a7e49e313edff1420b | |
parent | c952363512761d2664d2b83c900c1cfc0d14d864 (diff) |
GraphicsContext: add indirect draw methods
Change-Id: Ibcb7f629ede86d3808451ee09c0b7f5016492a00
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | src/render/graphicshelpers/graphicscontext.cpp | 12 | ||||
-rw-r--r-- | src/render/graphicshelpers/graphicscontext_p.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp index 4a9d16e89..f7ba5c3c4 100644 --- a/src/render/graphicshelpers/graphicscontext.cpp +++ b/src/render/graphicshelpers/graphicscontext.cpp @@ -858,6 +858,13 @@ void GraphicsContext::drawElements(GLenum primitiveType, baseVertex); } +void GraphicsContext::drawElementsIndirect(GLenum mode, + GLenum type, + void *indirect) +{ + m_glHelper->drawElementsIndirect(mode, type, indirect); +} + /*! * Wraps an OpenGL call to glDrawArrays. */ @@ -870,6 +877,11 @@ void GraphicsContext::drawArrays(GLenum primitiveType, count); } +void GraphicsContext::drawArraysIndirect(GLenum mode, void *indirect) +{ + m_glHelper->drawArraysIndirect(mode, indirect); +} + void GraphicsContext::setVerticesPerPatch(GLint verticesPerPatch) { m_glHelper->setVerticesPerPatch(verticesPerPatch); diff --git a/src/render/graphicshelpers/graphicscontext_p.h b/src/render/graphicshelpers/graphicscontext_p.h index 8067bb8b8..65830bf09 100644 --- a/src/render/graphicshelpers/graphicscontext_p.h +++ b/src/render/graphicshelpers/graphicscontext_p.h @@ -206,9 +206,11 @@ public: void disablePrimitiveRestart(); void dispatchCompute(int x, int y, int z); void drawArrays(GLenum primitiveType, GLint first, GLsizei count); + void drawArraysIndirect(GLenum mode,void *indirect); 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); + void drawElementsIndirect(GLenum mode, GLenum type, void *indirect); void drawElementsInstancedBaseVertexBaseInstance(GLenum primitiveType, GLsizei primitiveCount, GLint indexType, void * indices, GLsizei instances, GLint baseVertex, GLint baseInstance); void enableClipPlane(int clipPlane); void enablei(GLenum cap, GLuint index); |