Produce unimplemented warning for QOpenGLBuffer::map only once

Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Alex Wilson 2012-02-14 13:25:26 +10:00 committed by Qt by Nokia
parent be0dfa3473
commit c7d3f9be58

View File

@ -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;
}