vulkan not working
This commit is contained in:
parent
a1be917178
commit
c45afab0dd
21 changed files with 1319 additions and 438 deletions
48
main.cpp
48
main.cpp
|
|
@ -1,24 +1,40 @@
|
|||
#include <iostream>
|
||||
#include <exception>
|
||||
#include <thread>
|
||||
#include <vulkan/vulkan.h>
|
||||
import Crafter.Graphics;
|
||||
using namespace Crafter;
|
||||
|
||||
int main() {
|
||||
Window 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);
|
||||
// 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();
|
||||
|
||||
window.Start();
|
||||
while(true) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue