diff options
author | Juan José Casafranca <jjcasmar@gmail.com> | 2016-12-20 10:12:55 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-01-31 08:59:41 +0000 |
commit | 1025ec92da6360a516a34e4fb483f82505f656ea (patch) | |
tree | 6460fd707d8dd46ba0af95e5b86a5e3080111ac8 /src/render/graphicshelpers/graphicshelpergl3_3.cpp | |
parent | 38a284dce96b14f695a27879119e7a28b20756e1 (diff) |
Transfers gpu buffer data to cpu
Added some code to retrieve the data in the gpu back to a cpu pointer
in the opengl helpers.
Added a framegraph node which specifies if any data must be downloaded
from the gpu
Added a flag in the buffer object to specify if the data from that
buffer must be downloaded.
Added a job to send the data back to the frontend.
Added a path in the renderer to download the gpu data.
Task number: QTBUG-57727
Change-Id: I315a9221e5116c7d07f818e00c654fe1901144f4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicshelpergl3_3.cpp')
-rw-r--r-- | src/render/graphicshelpers/graphicshelpergl3_3.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp index 023e90965..4f6e38bf4 100644 --- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp +++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp @@ -879,6 +879,16 @@ void GraphicsHelperGL3_3::dispatchCompute(GLuint wx, GLuint wy, GLuint wz) qWarning() << "Compute Shaders are not supported by OpenGL 3.3 (since OpenGL 4.3)"; } +char *GraphicsHelperGL3_3::mapBuffer(GLenum target) +{ + return static_cast<char*>(m_funcs->glMapBuffer(target, GL_READ_WRITE)); +} + +GLboolean GraphicsHelperGL3_3::unmapBuffer(GLenum target) +{ + return m_funcs->glUnmapBuffer(target); +} + void GraphicsHelperGL3_3::glUniform1fv(GLint location, GLsizei count, const GLfloat *values) { m_funcs->glUniform1fv(location, count, values); |