1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-03 04:53:35 +00:00

Simplify lovrGraphicsClear;

This commit is contained in:
bjorn 2017-08-01 13:11:32 -07:00
parent 48733f87c4
commit 146d037cae

View file

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