summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicshelpergl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphicshelpers/graphicshelpergl2.cpp')
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2.cpp26
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);