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