diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-02-20 11:03:16 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-02-21 09:15:18 +0100 |
commit | 2940c375e40687f5758d173adceaee212239e2ca (patch) | |
tree | 3f75011b37d9d0e205e4d11d6a85dc38fa9b8f51 /src/gui/rhi/qrhigles2_p_p.h | |
parent | 79b605d285d006ff7434fc813effa3479138b952 (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.h | 1 |
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; |