From c7d3f9be585b5aa4d0d53350a0a23f68ddd3c22f Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Tue, 14 Feb 2012 13:25:26 +1000 Subject: Produce unimplemented warning for QOpenGLBuffer::map only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6 Reviewed-by: Samuel Rødal --- src/gui/opengl/qopenglbuffer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gui/opengl/qopenglbuffer.cpp') diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index e0ab98df21..e6879a9e60 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -529,7 +529,11 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access) return glMapBufferARB(d->type, access); #endif Q_UNUSED(access); - qWarning("QOpenGLBuffer::map(): pending implementation"); + static bool warned = false; + if (!warned) { + qWarning("QOpenGLBuffer::map(): pending implementation"); + warned = true; + } return 0; } @@ -560,7 +564,11 @@ bool QOpenGLBuffer::unmap() return false; return glUnmapBufferARB(d->type) == GL_TRUE; #endif - qWarning("QOpenGLBuffer::map(): pending implementation"); + static bool warned = false; + if (!warned) { + qWarning("QOpenGLBuffer::map(): pending implementation"); + warned = true; + } return 0; } -- cgit v1.2.1