diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-05-24 12:09:44 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-05-24 12:10:02 +0100 |
commit | 77d294db076dac19e8b549b445ffede9f7260c84 (patch) | |
tree | 828ee7a6862ec5c0bd24f97cb540625a2c647376 /src/render/graphicshelpers/graphicshelpergl2.cpp | |
parent | 59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff) | |
parent | 939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff) |
Merge branch 'dev' into wip/animationwip/animation
Change-Id: I6e770609c90a7745d08fa4e2f424e865678c5d6f
Diffstat (limited to 'src/render/graphicshelpers/graphicshelpergl2.cpp')
-rw-r--r-- | src/render/graphicshelpers/graphicshelpergl2.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/render/graphicshelpers/graphicshelpergl2.cpp b/src/render/graphicshelpers/graphicshelpergl2.cpp index 765a12f42..5f798f94e 100644 --- a/src/render/graphicshelpers/graphicshelpergl2.cpp +++ b/src/render/graphicshelpers/graphicshelpergl2.cpp @@ -518,7 +518,7 @@ GLint GraphicsHelperGL2::maxClipPlaneCount() return max; } -void GraphicsHelperGL2::memoryBarrier(QMemoryBarrier::BarrierTypes barriers) +void GraphicsHelperGL2::memoryBarrier(QMemoryBarrier::Operations barriers) { Q_UNUSED(barriers); qWarning() << "memory barrier is not supported by OpenGL 2.0 (since 4.3)"; @@ -541,15 +541,11 @@ void GraphicsHelperGL2::clearBufferf(GLint drawbuffer, const QVector4D &values) void GraphicsHelperGL2::pointSize(bool programmable, GLfloat value) { - // Print a warning once for trying to set GL_PROGRAM_POINT_SIZE - if (programmable) { - static bool warned = false; - if (!warned) { - qWarning() << "GL_PROGRAM_POINT_SIZE is not supported by OpenGL 2.0 (since 3.2)"; - warned = true; - } - } - m_funcs->glPointSize(value); + m_funcs->glEnable(GL_POINT_SPRITE); + if (programmable) + m_funcs->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + else + m_funcs->glPointSize(value); } void GraphicsHelperGL2::enablei(GLenum cap, GLuint index) @@ -600,6 +596,16 @@ void GraphicsHelperGL2::dispatchCompute(GLuint wx, GLuint wy, GLuint wz) qWarning() << "Compute Shaders are not supported by OpenGL 2.0 (since OpenGL 4.3)"; } +char *GraphicsHelperGL2::mapBuffer(GLenum target) +{ + return static_cast<char*>(m_funcs->glMapBuffer(target, GL_READ_WRITE)); +} + +GLboolean GraphicsHelperGL2::unmapBuffer(GLenum target) +{ + return m_funcs->glUnmapBuffer(target); +} + void GraphicsHelperGL2::glUniform1fv(GLint location, GLsizei count, const GLfloat *values) { m_funcs->glUniform1fv(location, count, values); |