new structure complete

This commit is contained in:
Jorijn van der Graaf 2025-11-16 18:52:52 +01:00
commit e7d0bc8f8e
69 changed files with 141 additions and 2733 deletions

View file

@ -1,31 +1,11 @@
/*
Crafter®.Graphics
Copyright (C) 2025 Catcrafts®
Catcrafts.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../../lib/VulkanInitializers.hpp"
#include <cstring>
#include <vector>
#include <vulkan/vulkan.h>
//required for the camera matrix.
import Crafter.Math;
import Crafter.Event;
import std;
import Crafter.Graphics;
using namespace Crafter;
@ -44,7 +24,7 @@ class CustomShader {
Initialze our buffer as shader visible storage buffer with the size of the colors vector.
*/
CustomShader(const std::vector<Vector<float, 4>>& colors) : colors(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, colors.size()) {
memcpy(this->colors.value, colors.data(), colors.size()*sizeof(Vector<float, 4>));
std::memcpy(this->colors.value, colors.data(), colors.size()*sizeof(Vector<float, 4>));
}
void WriteDescriptors(VkDescriptorSet set) {
/*