2026-03-02 23:53:13 +01:00
|
|
|
#include "vulkan/vulkan.h"
|
2025-06-13 23:59:36 +02:00
|
|
|
|
|
|
|
|
import Crafter.Graphics;
|
|
|
|
|
using namespace Crafter;
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
/*
|
|
|
|
|
This sets up all necessary things and creates the vulkan device.
|
|
|
|
|
This must be called before any vulkan related things.
|
|
|
|
|
Things like VkDevice are static members of the VulkanDevice class.
|
|
|
|
|
*/
|
|
|
|
|
VulkanDevice::CreateDevice();
|
2026-01-27 22:34:24 +01:00
|
|
|
WindowVulkan window(1280, 720, "HelloVulkan");
|
2025-06-13 23:59:36 +02:00
|
|
|
|
2026-01-27 22:34:24 +01:00
|
|
|
// /*
|
|
|
|
|
// StartInit gives you a VkCommandBuffer to use before the event loop starts
|
|
|
|
|
// Use this for inititializing things like textures.
|
|
|
|
|
// */
|
|
|
|
|
// VkCommandBuffer cmd = window.StartInit();
|
2025-06-13 23:59:36 +02:00
|
|
|
|
2026-01-27 22:34:24 +01:00
|
|
|
// /*
|
|
|
|
|
// FinishInit executes all commands recorded to StartInit.
|
|
|
|
|
// This must be called before the the event loops starts if you called StartInit before.
|
|
|
|
|
// */
|
|
|
|
|
// window.FinishInit();
|
2025-06-13 23:59:36 +02:00
|
|
|
|
2026-01-27 22:34:24 +01:00
|
|
|
window.Render();
|
2025-06-13 23:59:36 +02:00
|
|
|
window.StartSync();
|
|
|
|
|
}
|