Initial procedural 3D engine setup
- Updated README.md with modern project structure and features - Cleaned up Android build files (not needed for desktop engine) - Restructured as procedural 3D engine with ImGui integration - Based on Sascha Willems Vulkan framework with dynamic rendering - Added comprehensive build instructions and camera system docs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ca9be0c589
commit
09ba229353
2429 changed files with 7751 additions and 112835 deletions
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Vulkan device class
|
||||
*
|
||||
* Encapsulates a physical Vulkan device and its logical representation
|
||||
*
|
||||
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VulkanBuffer.h"
|
||||
#include "VulkanTools.h"
|
||||
#include "vulkan/vulkan.h"
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <exception>
|
||||
|
||||
namespace vks
|
||||
{
|
||||
struct VulkanDevice
|
||||
{
|
||||
/** @brief Physical device representation */
|
||||
VkPhysicalDevice physicalDevice;
|
||||
/** @brief Logical device representation (application's view of the device) */
|
||||
VkDevice logicalDevice;
|
||||
/** @brief Properties of the physical device including limits that the application can check against */
|
||||
VkPhysicalDeviceProperties properties;
|
||||
/** @brief Features of the physical device that an application can use to check if a feature is supported */
|
||||
VkPhysicalDeviceFeatures features;
|
||||
/** @brief Features that have been enabled for use on the physical device */
|
||||
VkPhysicalDeviceFeatures enabledFeatures;
|
||||
/** @brief Memory types and heaps of the physical device */
|
||||
VkPhysicalDeviceMemoryProperties memoryProperties;
|
||||
/** @brief Queue family properties of the physical device */
|
||||
std::vector<VkQueueFamilyProperties> queueFamilyProperties;
|
||||
/** @brief List of extensions supported by the device */
|
||||
std::vector<std::string> supportedExtensions;
|
||||
/** @brief Default command pool for the graphics queue family index */
|
||||
VkCommandPool commandPool = VK_NULL_HANDLE;
|
||||
/** @brief Contains queue family indices */
|
||||
struct
|
||||
{
|
||||
uint32_t graphics;
|
||||
uint32_t compute;
|
||||
uint32_t transfer;
|
||||
} queueFamilyIndices;
|
||||
operator VkDevice() const
|
||||
{
|
||||
return logicalDevice;
|
||||
};
|
||||
explicit VulkanDevice(VkPhysicalDevice physicalDevice);
|
||||
~VulkanDevice();
|
||||
uint32_t getMemoryType(uint32_t typeBits, VkMemoryPropertyFlags properties, VkBool32 *memTypeFound = nullptr) const;
|
||||
uint32_t getQueueFamilyIndex(VkQueueFlags queueFlags) const;
|
||||
VkResult createLogicalDevice(VkPhysicalDeviceFeatures enabledFeatures, std::vector<const char *> enabledExtensions, void *pNextChain, bool useSwapChain = true, VkQueueFlags requestedQueueTypes = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT);
|
||||
VkResult createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, VkDeviceSize size, VkBuffer *buffer, VkDeviceMemory *memory, void *data = nullptr);
|
||||
VkResult createBuffer(VkBufferUsageFlags usageFlags, VkMemoryPropertyFlags memoryPropertyFlags, vks::Buffer *buffer, VkDeviceSize size, void *data = nullptr);
|
||||
void copyBuffer(vks::Buffer *src, vks::Buffer *dst, VkQueue queue, VkBufferCopy *copyRegion = nullptr);
|
||||
VkCommandPool createCommandPool(uint32_t queueFamilyIndex, VkCommandPoolCreateFlags createFlags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
|
||||
VkCommandBuffer createCommandBuffer(VkCommandBufferLevel level, VkCommandPool pool, bool begin = false);
|
||||
VkCommandBuffer createCommandBuffer(VkCommandBufferLevel level, bool begin = false);
|
||||
void flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue, VkCommandPool pool, bool free = true);
|
||||
void flushCommandBuffer(VkCommandBuffer commandBuffer, VkQueue queue, bool free = true);
|
||||
bool extensionSupported(std::string extension);
|
||||
VkFormat getSupportedDepthFormat(bool checkSamplingSupport);
|
||||
};
|
||||
} // namespace vks
|
||||
Loading…
Add table
Add a link
Reference in a new issue