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:
parent
be0dfa3473
commit
c7d3f9be58
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user