Crafter.Graphics/main.cpp

40 lines
1.2 KiB
C++
Raw Normal View History

2025-04-16 00:43:33 +02:00
#include <iostream>
#include <exception>
2025-04-19 15:46:26 +02:00
#include <thread>
#include <vulkan/vulkan.h>
2025-04-16 00:43:33 +02:00
import Crafter.Graphics;
using namespace Crafter;
int main() {
2025-04-19 15:46:26 +02:00
// WindowWaylandWayland window("test", 128, 128);
// UiElement test(
// 0.5, //anchorX
// 0.5, //anchorY
// 2, //bufferWidth
// 1, //bufferHeight
// std::uint32_t(30), //absoluteSizeX
// std::uint32_t(30), //absoluteSizeY
// 0.5, //anchorOffsetX
// 0.5, //anchorOffsetY
// 0, //z
// false //ignoreScaling
// );
// window.scale = 1;
// test.buffer = {{255, 0, 0 ,255}, {0, 255, 0 ,255}};
// window.elements.AddComponent(&test);
// window.Start();
// while(true) {
// }
VulkanDevice::CreateDevice();
WindowWaylandVulkan window("bruh", 128, 128);
VulkanShader<"test.spirv", "main", VK_SHADER_STAGE_MESH_BIT_EXT>::CreateShader();
VulkanShader<"test2.spirv", "main", VK_SHADER_STAGE_FRAGMENT_BIT>::CreateShader();
VulkanPipeline<VulkanShader<"test.spirv", "main", VK_SHADER_STAGE_MESH_BIT_EXT>, VulkanShader<"test2.spirv", "main", VK_SHADER_STAGE_FRAGMENT_BIT>>::CreatePipeline();
2025-04-16 00:43:33 +02:00
window.Start();
2025-04-19 15:46:26 +02:00
while(true) {
}
2025-04-16 00:43:33 +02:00
}