Files
oatmeal/examples/createContext/main.cpp
firewire 14b4e60d3a
Some checks failed
Build / Build (push) Failing after 2m8s
examples - comments
2026-04-12 23:42:15 -04:00

38 lines
842 B
C++

// createContext
// Still in progress, although I'm 95% sure this wont get changed.
// Come back later!
// - Firewire
#include <cstdlib>
#include <exception>
#include "GLFW/glfw3.h"
#include "shared/logger.h"
#include "shared/window.h"
#include "ctx.h"
int main() {
OatmealUtils::initLogging();
OatmealUtils::createLogger("context", nullptr);
GLFWwindow *window = OatmealUtils::initWindow("Oatmeal - createContext", 800, 600);
try {
Oatmeal::ctx ctx(window);
} catch (const std::exception &e) {
OatmealUtils::getLogger("context")->critical("{}", e.what());
return EXIT_FAILURE;
}
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
}
OatmealUtils::getLogger("window")->info("Cleaning up");
glfwDestroyWindow(window);
glfwTerminate();
return 0;
}