diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..47ba8c3 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "some_name", + "includePath": [ + "${workspaceFolder}/include", + "C:/VulkanSDK/1.2.189.2/Include", + "${workspaceFolder}/../dependencies/GLFW/include" + ], + "compilerPath": "C:/MinGW/bin/g++.exe", + "cStandard": "c11", + "cppStandard": "c++11", + "intelliSenseMode": "gcc-x86" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..bb37bab --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,40 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++.exe сборка активного файла", + "command": "C:/MinGW/bin/g++.exe", + "args": [ + "-fdiagnostics-color=always", + "${workspaceRoot}/src/*.cpp", + + "-I${workspaceRoot}/include", + + "--std=c++11", + + "-IC:/VulkanSDK/1.2.189.2/Include", + "-LC:/VulkanSDK/1.2.189.2/Lib32", + + "-I${workspaceRoot}/../dependencies/GLFW/include", + "-L${workspaceRoot}/../dependencies/GLFW/lib-mingw", + "-static", + "-lvulkan-1", + "-lglfw3dll", + "-o", + "${workspaceRoot}/${workspaceFolderBasename}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Задача создана отладчиком." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/glfw3.dll b/glfw3.dll new file mode 100644 index 0000000..f0f4e36 Binary files /dev/null and b/glfw3.dll differ diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..d341ba4 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,38 @@ +#include + +#include + +#include + +int main(int argc, char* argv[]) { + + // Инициализация GLFW + glfwInit(); + + // Проверка доступности Vulkan + if (glfwVulkanSupported()) + { + // Отключим создание контекста + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + // Отключим возможность изменения размеров окна + glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); + // Создание окна + GLFWwindow* window = glfwCreateWindow(800, 600, "Vulkan window", nullptr, nullptr); + + // Жизненный цикл + while(!glfwWindowShouldClose(window)) { + // Обработка событий + glfwPollEvents(); + } + + // Уничтожение окна + glfwDestroyWindow(window); + } + else + std::cout << "There is no Vulkan Supported\n"; + + // Завершение работы с GLFW + glfwTerminate(); + + return 0; +}