Копия проекта с репозитория 01

This commit is contained in:
parent c6e1ba2504
commit 35cdc26f56
5 changed files with 95 additions and 11 deletions

11
.gitignore vendored
View File

@ -12,21 +12,10 @@
*.gch *.gch
*.pch *.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files # Fortran module files
*.mod *.mod
*.smod *.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables # Executables
*.exe *.exe
*.out *.out

17
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -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
}

40
.vscode/tasks.json vendored Normal file
View File

@ -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"
}

BIN
glfw3.dll Normal file

Binary file not shown.

38
src/main.cpp Normal file
View File

@ -0,0 +1,38 @@
#include <vulkan/vulkan.h>
#include <GLFW/glfw3.h>
#include <iostream>
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;
}