[core] Suppress "stencil mask overflow" warning
When it starts, we get a log warning for every frame, which is expensive. Now we get only one warning.
This commit is contained in:
committed by
Thiago Marcos P. Santos
parent
df5252725c
commit
bc868b8433
@@ -76,8 +76,13 @@ void ClipIDGenerator::update(Renderables& renderables) {
|
||||
bit_offset += bit_count;
|
||||
}
|
||||
|
||||
if (bit_offset > 8) {
|
||||
// Prevent this warning from firing on every frame,
|
||||
// which can be expensive in some platforms.
|
||||
static bool warned = false;
|
||||
|
||||
if (!warned && bit_offset > 8) {
|
||||
Log::Error(Event::OpenGL, "stencil mask overflow");
|
||||
warned = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user