2022-04-23 14:48:42 +03:00
|
|
|
#include "peripherals_glfw.h"
|
|
|
|
|
|
|
|
|
|
int main() {
|
2022-04-23 16:41:33 +03:00
|
|
|
acidrain::peripherals_glfw peripherals;
|
|
|
|
|
peripherals.init();
|
2022-04-23 14:48:42 +03:00
|
|
|
|
2022-04-23 16:41:33 +03:00
|
|
|
glDisable(GL_DEPTH_TEST);
|
2022-04-23 14:48:42 +03:00
|
|
|
|
2022-04-23 16:41:33 +03:00
|
|
|
double alpha = 0.0;
|
|
|
|
|
while (!peripherals.should_close()) {
|
|
|
|
|
alpha += 0.01;
|
|
|
|
|
if (alpha > 1.0) alpha = 0.0;
|
2022-04-23 14:48:42 +03:00
|
|
|
|
2022-04-23 16:41:33 +03:00
|
|
|
glClearColor(0.0 * alpha, 0.1 * alpha, 1.0 * alpha, 1 * alpha);
|
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
2022-04-23 14:48:42 +03:00
|
|
|
|
2022-04-23 16:41:33 +03:00
|
|
|
peripherals.swap_buffers();
|
|
|
|
|
peripherals.poll_events();
|
|
|
|
|
}
|
2022-04-23 14:48:42 +03:00
|
|
|
}
|