29 lines
878 B
C++
29 lines
878 B
C++
#include <vulkan/vulkan.h>
|
|
|
|
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();
|
|
WindowVulkan window(1280, 720, "HelloVulkan");
|
|
|
|
// /*
|
|
// StartInit gives you a VkCommandBuffer to use before the event loop starts
|
|
// Use this for inititializing things like textures.
|
|
// */
|
|
// VkCommandBuffer cmd = window.StartInit();
|
|
|
|
// /*
|
|
// FinishInit executes all commands recorded to StartInit.
|
|
// This must be called before the the event loops starts if you called StartInit before.
|
|
// */
|
|
// window.FinishInit();
|
|
|
|
window.Render();
|
|
window.StartSync();
|
|
}
|