fix some build errors or something

This commit is contained in:
2026-05-08 12:37:23 -04:00
parent dca85ff7e8
commit d5c6aa10ae
6 changed files with 28 additions and 5 deletions
+17
View File
@@ -1,6 +1,7 @@
#include "Gryphn/gryphn.h"
#include <iostream>
#include "stdlib.h"
#include "glfw/include/GLFW/glfw3.h"
#define CONCAT_IMPL(a, b) a##b
#define CONCAT(a, b) CONCAT_IMPL(a, b)
@@ -11,6 +12,7 @@
<< ": " << CONCAT(res, __LINE__) << "\n"; \
}
GLFWwindow* window;
gnVersion version = gnCreateVersion(1, 0, 0);
gnInstance instance;
gnDevice device;
@@ -61,13 +63,28 @@ void createDevice() {
}
int main() {
if (!glfwInit()) {
std::cout << "Failed to init GLFW\n";
return -1;
}
window = glfwCreateWindow(640, 360, "Chemistry Rendering App", nullptr, nullptr);
if (!window) {
std::cerr << "Failed to create window\n";
return -1;
}
try {
createInstance();
createDevice();
while (!glfwWindowShouldClose(window)) {
glfwPollEvents();
}
} catch (const std::exception& e) {
std::cerr << "Caught Exception: " << e.what() << "\n";
return 0;
}
glfwDestroyWindow(window);
gnDestroyDevice(&device);
gnDestroyInstance(&instance);
}