Patch Update - V9.2.8

Remove Vulkan related code
This commit is contained in:
2025-03-23 13:45:17 +01:00
parent 1ea77c909f
commit ede5080c10
6 changed files with 7 additions and 170 deletions

View File

@@ -6,7 +6,6 @@
// MY CLASS INCLUDES //
///////////////////////
#include "d3dclass.h"
#include "vulkan.h"
#include "cameraclass.h"
#include "object.h"
#include "lightclass.h"
@@ -183,7 +182,6 @@ private :
// ------------------------------------- //
D3DClass* m_Direct3D;
VulkanClass* m_Vulkan;
IDXGISwapChain* m_swapChain;
ModelClass* m_Model,* m_GroundModel, * m_WallModel, * m_BathModel, * m_WaterModel;
ModelListClass* m_ModelList;

View File

@@ -1,49 +0,0 @@
#pragma once
#include "Vulkan/Include/vulkan/vulkan.h"
#include <vector>
#include <windows.h>
#include <stdexcept>
#include "Logger.h"
class VulkanClass {
public:
void Initialize(HWND hwnd, int width, int height);
void Shutdown();
void Render();
private:
void CreateInstance();
void CreateSurface(HWND hwnd);
void PickPhysicalDevice();
void CreateLogicalDevice();
void CreateSwapChain(int width, int height);
void CreateImageViews();
void CreateRenderPass();
void CreateGraphicsPipeline();
void CreateFramebuffers();
void CreateCommandPool();
void CreateCommandBuffers();
void CreateSyncObjects();
VkInstance instance;
VkSurfaceKHR surface;
VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
VkDevice device;
VkQueue graphicsQueue;
VkQueue presentQueue;
VkSwapchainKHR swapChain;
std::vector<VkImage> swapChainImages;
VkFormat swapChainImageFormat;
VkExtent2D swapChainExtent;
std::vector<VkImageView> swapChainImageViews;
VkRenderPass renderPass;
VkPipelineLayout pipelineLayout;
VkPipeline graphicsPipeline;
std::vector<VkFramebuffer> swapChainFramebuffers;
VkCommandPool commandPool;
std::vector<VkCommandBuffer> commandBuffers;
std::vector<VkSemaphore> imageAvailableSemaphores;
std::vector<VkSemaphore> renderFinishedSemaphores;
std::vector<VkFence> inFlightFences;
};

View File

@@ -67,14 +67,6 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd,
{
Logger::Get().Log("Initializing application class", __FILE__, __LINE__, Logger::LogLevel::Initialize);
if (IsVulkan)
{
m_Vulkan = new VulkanClass();
m_Vulkan->Initialize(hwnd, screenWidth, screenHeight);
return true;
}
try
{
@@ -480,13 +472,6 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd,
void ApplicationClass::Shutdown()
{
Logger::Get().Log("Shutting down application class", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
if (m_Vulkan)
{
m_Vulkan->Shutdown();
delete m_Vulkan;
m_Vulkan = nullptr;
}
// Release the shader manager object.
if (m_ShaderManager)
@@ -712,8 +697,6 @@ void ApplicationClass::Shutdown()
bool ApplicationClass::Frame(InputClass* Input)
{
m_Vulkan->Render();
int mouseX, mouseY, currentMouseX, currentMouseY;
bool result, leftMouseDown, rightMouseDown, buttonQ, buttonD, buttonZ, buttonS, buttonA, buttonE, scrollUp, scrollDown;

View File

@@ -1,98 +0,0 @@
#include "vulkan.h"
void VulkanClass::Initialize(HWND hwnd, int width, int height) {
CreateInstance();
CreateSurface(hwnd);
PickPhysicalDevice();
CreateLogicalDevice();
CreateSwapChain(width, height);
CreateImageViews();
CreateRenderPass();
CreateGraphicsPipeline();
CreateFramebuffers();
CreateCommandPool();
CreateCommandBuffers();
CreateSyncObjects();
}
void VulkanClass::Shutdown() {
for (size_t i = 0; i < swapChainFramebuffers.size(); i++) {
vkDestroyFramebuffer(device, swapChainFramebuffers[i], nullptr);
}
vkDestroyPipeline(device, graphicsPipeline, nullptr);
vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
vkDestroyRenderPass(device, renderPass, nullptr);
for (size_t i = 0; i < swapChainImageViews.size(); i++) {
vkDestroyImageView(device, swapChainImageViews[i], nullptr);
}
vkDestroySwapchainKHR(device, swapChain, nullptr);
vkDestroyDevice(device, nullptr);
vkDestroySurfaceKHR(instance, surface, nullptr);
vkDestroyInstance(instance, nullptr);
}
void VulkanClass::Render() {
// Rendering code will go here
}
void VulkanClass::CreateInstance() {
VkApplicationInfo appInfo{};
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
appInfo.pApplicationName = "Vulkan App";
appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
appInfo.pEngineName = "No Engine";
appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
appInfo.apiVersion = VK_API_VERSION_1_0;
VkInstanceCreateInfo createInfo{};
createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
createInfo.pApplicationInfo = &appInfo;
if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) {
throw std::runtime_error("failed to create instance!");
}
}
void VulkanClass::CreateSurface(HWND hwnd) {
// Platform-specific surface creation code
}
void VulkanClass::PickPhysicalDevice() {
// Code to pick a suitable physical device
}
void VulkanClass::CreateLogicalDevice() {
// Code to create a logical device
}
void VulkanClass::CreateSwapChain(int width, int height) {
// Code to create a swap chain
}
void VulkanClass::CreateImageViews() {
// Code to create image views
}
void VulkanClass::CreateRenderPass() {
// Code to create a render pass
}
void VulkanClass::CreateGraphicsPipeline() {
// Code to create a graphics pipeline
}
void VulkanClass::CreateFramebuffers() {
// Code to create framebuffers
}
void VulkanClass::CreateCommandPool() {
// Code to create a command pool
}
void VulkanClass::CreateCommandBuffers() {
// Code to create command buffers
}
void VulkanClass::CreateSyncObjects() {
// Code to create synchronization objects
}