private: void initWindow() {glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);}
window = glfwCreateWindow(800, 600, "Vulkan", nullptr, nullptr);
void mainLoop() { while (!glfwWindowShouldClose(window)) { glfwPollEvents(); } }
window didnt Initialized
Why?
Show initWindow, initVulkan, mainLoop
void initWindow() { glfwInit(); glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); window = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan", nullptr, nullptr); }
private: void initVulkan() { } void mainLoop() { } void cleanup() { } }; int main() { HelloTriangleApplication app; try { app.run(); } catch (const std::exception& e) { std::cerr << e.what() << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } Is it a good way or not?
Please use, proper indentation and structure.. Nobody would even bother to read this to help you..
When i want to send code in telegram The code was bad copied
To post more than a few lines of code, use a pastebin like: * dpaste.org * linkode.org * bin.kv2.dev * hastebin.com If you are stuck in a terminal, you can use ix.io or paste.rs to paste from the CLI: <command to print output> |& curl -F 'f:1=<-' ix.io <command to print output> |& curl --data-binary @- https://paste.rs
preserves indentation
#include <vulkan/vulkan.h> #include <iostream> #include <stdexcept> #include <cstdlib> class HelloTriangleApplication { public: void run() { initVulkan(); mainLoop(); cleanup(); } private: void initVulkan() { } void mainLoop() { } void cleanup() { } }; int main() { HelloTriangleApplication app; try { app.run(); } catch (const std::exception& e) { std::cerr << e.what() << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; } i run this code but window didnt appear
Zero reason for a class here heh
Missinf some code here huh?
use a pasting website sar, make your life easier for yourself. Here: https://www.youtube.com/watch?v=YGgWw7jM0ck
I dont now Maybe i should using vulkan with glfw or sdl
Which OS are you on?
3d Graphics library(api)
Обсуждают сегодня