Simplify lovrGraphicsClear;

This commit is contained in:
bjorn 2017-08-01 13:11:32 -07:00
parent 48733f87c4
commit 146d037cae
1 changed files with 2 additions and 13 deletions

View File

@ -147,19 +147,8 @@ void lovrGraphicsReset() {
}
void lovrGraphicsClear(int color, int depth) {
int bits = 0;
if (color) {
bits |= GL_COLOR_BUFFER_BIT;
}
if (depth) {
bits |= GL_DEPTH_BUFFER_BIT;
}
if (bits != 0) {
glClear(bits);
}
if (!color && !depth) return;
glClear((color ? GL_COLOR_BUFFER_BIT : 0) | (depth ? GL_DEPTH_BUFFER_BIT : 0));
}
void lovrGraphicsPresent() {