This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <memory>
|
||||
#include "GLFW/glfw3.h"
|
||||
#include "shared/logger.h"
|
||||
#include "shared/window.h"
|
||||
@@ -18,16 +19,18 @@ int main() {
|
||||
GLFWwindow *window = OatmealUtils::initWindow("Oatmeal - createContext", 800, 600);
|
||||
|
||||
|
||||
std::shared_ptr<Oatmeal::ctx> ctx = nullptr;
|
||||
|
||||
OatmealUtils::getLogger("context")->info("Creating context");
|
||||
try {
|
||||
Oatmeal::ctx ctx(window);
|
||||
OatmealUtils::getLogger("context")->info("Device name: {}", ctx.getDeviceName());
|
||||
OatmealUtils::getLogger("context")->info("Device name: {}", ctx.getDeviceType());
|
||||
ctx = std::make_shared<Oatmeal::ctx>(window);
|
||||
} catch (const std::exception &e) {
|
||||
OatmealUtils::getLogger("context")->critical("{}", e.what());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
OatmealUtils::getLogger("context")->info("Device name: {}", ctx->getDeviceName());
|
||||
OatmealUtils::getLogger("context")->info("Device Type: {}", ctx->getDeviceType());
|
||||
|
||||
OatmealUtils::getLogger("context")->info("Starting main loop");
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
|
||||
Reference in New Issue
Block a user