summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-02-20 11:03:16 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-02-21 09:15:18 +0100
commit2940c375e40687f5758d173adceaee212239e2ca (patch)
tree3f75011b37d9d0e205e4d11d6a85dc38fa9b8f51 /src/gui/rhi/qrhigles2_p_p.h
parent79b605d285d006ff7434fc813effa3479138b952 (diff)
rhi: Allow querying the native buffer objects behind a QRhiBuffer
Modeled after QRhiTexture's NativeTexture query. This becomes valuable in advanced cases of integrating external native rendering code with Qt Quick(3D), because it allows using (typically vertex and index) buffers created by Quick(3D) in the custom renderer as well, without having to duplicate the content by manually creating native buffers with the same vertex and index data. Change-Id: I659193345fa1dfe6221b898043f0b75ba649d296 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2_p_p.h')
-rw-r--r--src/gui/rhi/qrhigles2_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhigles2_p_p.h b/src/gui/rhi/qrhigles2_p_p.h
index e10da2a342..8b7d01532a 100644
--- a/src/gui/rhi/qrhigles2_p_p.h
+++ b/src/gui/rhi/qrhigles2_p_p.h
@@ -64,6 +64,7 @@ struct QGles2Buffer : public QRhiBuffer
~QGles2Buffer();
void release() override;
bool build() override;
+ QRhiBuffer::NativeBuffer nativeBuffer() override;
GLuint buffer = 0;
GLenum targetForDataOps;