commit eb79d538deb10991fdfad062bbcefdae801ceea1 Author: JimmyBinoculars Date: Fri Feb 20 01:08:15 2026 +0000 Initial commit diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..32704f3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "C_Cpp.default.compilerPath": "/usr/bin/gcc" +} \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..08551de --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +CFLAGS = -std=c++17 -O2 +LDFLAGS = -lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi + +VulkanTest: main.cpp + g++ $(CFLAGS) -o VulkanTest main.cpp $(LDFLAGS) + +.PHONY: test clean + +test: VulkanTest + ./VulkanTest + +clean: + rm -f VulkanTest \ No newline at end of file diff --git a/VulkanTest b/VulkanTest new file mode 100755 index 0000000..c34e554 Binary files /dev/null and b/VulkanTest differ diff --git a/helloWorld.cpp b/helloWorld.cpp new file mode 100644 index 0000000..a7bff40 --- /dev/null +++ b/helloWorld.cpp @@ -0,0 +1,8 @@ +#include + +using namespace std; + +int main() { + printf("Hello, World!\n"); + return 0; +} \ No newline at end of file diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..b8f6e6f --- /dev/null +++ b/main.cpp @@ -0,0 +1,35 @@ +#define GLFW_INCLUDE_VULKAN +#include + +#define GLM_FORCE_RADIANS +#define GLM_FORCE_DEPTH_ZERO_TO_ONE +#include +#include + +#include + +int main() { + glfwInit(); + + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + GLFWwindow* window = glfwCreateWindow(800, 600, "Vulkan window", nullptr, nullptr); + + uint32_t extensionCount = 0; + vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr); + + std::cout << extensionCount << " extensions supported\n"; + + glm::mat4 matrix; + glm::vec4 vec; + auto test = matrix * vec; + + while(!glfwWindowShouldClose(window)) { + glfwPollEvents(); + } + + glfwDestroyWindow(window); + + glfwTerminate(); + + return 0; +} \ No newline at end of file