123456789101112131415161718 |
- #include <iostream>
- #include "rendering/wrapper/GLFW.h"
- bool GLFW::init() {
- if(glfwInit()) {
- std::atexit([]() {
- glfwTerminate();
- });
- return false;
- }
- std::cout << "could not initialize GLFW\n";
- return true;
- }
- Nanos GLFW::getNanos() {
- return glfwGetTimerValue() * (1000000000 / glfwGetTimerFrequency());
- }
|