First commit from Arch

This commit is contained in:
2026-01-28 19:22:50 -05:00
parent 15b3e294b5
commit ab28c22446
18 changed files with 54 additions and 11 deletions

5
.clangd Normal file
View File

@@ -0,0 +1,5 @@
CompileFlags:
Add:
- -I./include
- -I/usr/include/vulkan
- -std=c++20

18
Makefile Normal file
View File

@@ -0,0 +1,18 @@
CXX = g++
CFLAGS = -std=c++20 -O2 -Wall -Wextra -I./include
LDFLAGS = -lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi
TARGET := LearningVulkan
$(TARGET): ./src/main.cpp
$(CXX) $(CFLAGS) -o $(TARGET) ./src/main.cpp $(LDFLAGS)
.PHONY: test clean
test: $(TARGET)
./$(TARGET)
clean:
rm -f $(TARGET)

18
compile_commands.json Normal file
View File

@@ -0,0 +1,18 @@
[
{
"file": "./src/main.cpp",
"arguments": [
"g++",
"-std=c++17",
"-O2",
"-Wall",
"-Wextra",
"-I./include",
"-o",
"LearningVulkan",
"./src/main.cpp"
],
"directory": "/home/Jordan/Projects/CPP/LearningVulkan",
"output": "LearningVulkan"
}
]

View File

@@ -3,7 +3,6 @@
#include <string> #include <string>
#include <source_location> #include <source_location>
#include <format> #include <format>
#include <stdexcept>
namespace Log namespace Log
{ {

View File

@@ -2,11 +2,11 @@
#include <string> #include <string>
#define VK_USE_PLATFORM_WIN32_KHR
#define GLFW_INCLUDE_VULKAN #define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#define GLFW_EXPOSE_NATIVE_WIN32
#include <GLFW/glfw3native.h> #include <GLFW/glfw3native.h>
#include <vulkan/vulkan_core.h>
struct FWindowConfig struct FWindowConfig
{ {

View File

@@ -2,12 +2,8 @@
// #include <vector> // #include <vector>
// #include <memory> // #include <memory>
// //
#include "Logger.h"
#include "VulkanInstanceManager.h" #include "VulkanInstanceManager.h"
#include "VulkanDeviceManager.h"
#include "VulkanDebugManager.h" #include "VulkanDebugManager.h"
#include "VulkanGraphicsPipeline.h"
#include "GlfwWindowManager.h"
#define GLFW_INCLUDE_VULKAN #define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>

View File

@@ -1,6 +1,7 @@
#pragma once #pragma once
#include "Utilities/FileReader.h" #include "FileReader.h"
#include "vulkan_core.h"
class VulkanGraphicsPipeline class VulkanGraphicsPipeline
{ {
@@ -22,6 +23,7 @@ public:
CreateInfo.pCode = reinterpret_cast<const uint32_t*>(Code.data()); CreateInfo.pCode = reinterpret_cast<const uint32_t*>(Code.data());
VkShaderModule ShaderModule; VkShaderModule ShaderModule;
if (vkCreateShaderModule(Device)) // if (vkCreateShaderModule(Device))
return ShaderModule;
} }
}; };

View File

@@ -18,6 +18,11 @@ struct AppConfig
bool bVerboseLogging = false; bool bVerboseLogging = false;
}; };
void test () {
if (true) return;
}
class HelloTriangleApplication class HelloTriangleApplication
{ {
public: public:
@@ -94,4 +99,4 @@ int main()
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }