diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6501f13..5c07d5b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,14 +21,14 @@ function(buildHomework HOMEWORK_NAME) SET(SOURCE ${SOURCE} ${CMAKE_BINARY_DIR}/xdg-shell-client-protocol.h ${CMAKE_BINARY_DIR}/xdg-shell-protocol.c ) ENDIF() # Add shaders - set(SHADER_DIR_GLSL "../data/buster_drone/shaders/glsl") - file(GLOB SHADERS_GLSL "${SHADER_DIR_GLSL}/*.vert" "${SHADER_DIR_GLSL}/*.frag" "${SHADER_DIR_GLSL}/*.comp" "${SHADER_DIR_GLSL}/*.geom" "${SHADER_DIR_GLSL}/*.tesc" "${SHADER_DIR_GLSL}/*.tese" "${SHADER_DIR_GLSL}/*.mesh" "${SHADER_DIR_GLSL}/*.task" "${SHADER_DIR_GLSL}/*.rgen" "${SHADER_DIR_GLSL}/*.rchit" "${SHADER_DIR_GLSL}/*.rmiss" "${SHADER_DIR_GLSL}/*.rcall") - set(SHADER_DIR_HLSL "../data/buster_drone/shaders/hlsl") - file(GLOB SHADERS_HLSL "${SHADER_DIR_HLSL}/*.vert" "${SHADER_DIR_HLSL}/*.frag" "${SHADER_DIR_HLSL}/*.comp" "${SHADER_DIR_HLSL}/*.geom" "${SHADER_DIR_HLSL}/*.tesc" "${SHADER_DIR_HLSL}/*.tese" "${SHADER_DIR_HLSL}/*.mesh" "${SHADER_DIR_HLSL}/*.task" "${SHADER_DIR_HLSL}/*.rgen" "${SHADER_DIR_HLSL}/*.rchit" "${SHADER_DIR_HLSL}/*.rmiss" "${SHADER_DIR_HLSL}/*.rcall") - source_group("Shaders\\GLSL" FILES ${SHADERS_GLSL}) - source_group("Shaders\\HLSL" FILES ${SHADERS_HLSL}) + #set(SHADER_DIR_GLSL "../data/buster_drone/shaders/glsl") + #file(GLOB SHADERS_GLSL "${SHADER_DIR_GLSL}/*.vert" "${SHADER_DIR_GLSL}/*.frag" "${SHADER_DIR_GLSL}/*.comp" "${SHADER_DIR_GLSL}/*.geom" "${SHADER_DIR_GLSL}/*.tesc" "${SHADER_DIR_GLSL}/*.tese" "${SHADER_DIR_GLSL}/*.mesh" "${SHADER_DIR_GLSL}/*.task" "${SHADER_DIR_GLSL}/*.rgen" "${SHADER_DIR_GLSL}/*.rchit" "${SHADER_DIR_GLSL}/*.rmiss" "${SHADER_DIR_GLSL}/*.rcall") + #set(SHADER_DIR_HLSL "../data/buster_drone/shaders/hlsl") + #file(GLOB SHADERS_HLSL "${SHADER_DIR_HLSL}/*.vert" "${SHADER_DIR_HLSL}/*.frag" "${SHADER_DIR_HLSL}/*.comp" "${SHADER_DIR_HLSL}/*.geom" "${SHADER_DIR_HLSL}/*.tesc" "${SHADER_DIR_HLSL}/*.tese" "${SHADER_DIR_HLSL}/*.mesh" "${SHADER_DIR_HLSL}/*.task" "${SHADER_DIR_HLSL}/*.rgen" "${SHADER_DIR_HLSL}/*.rchit" "${SHADER_DIR_HLSL}/*.rmiss" "${SHADER_DIR_HLSL}/*.rcall") + #source_group("Shaders\\GLSL" FILES ${SHADERS_GLSL}) + #source_group("Shaders\\HLSL" FILES ${SHADERS_HLSL}) # Add optional readme / tutorial - file(GLOB README_FILES "${HOMEWORK_FOLDER}/*.md") + #file(GLOB README_FILES "${HOMEWORK_FOLDER}/*.md") if(WIN32) add_executable(${HOMEWORK_NAME} WIN32 ${MAIN_CPP} ${SOURCE} ${MAIN_HEADER} ${SHADERS_GLSL} ${SHADERS_HLSL} ${README_FILES} "render/glTFModel.h" diff --git a/src/render/assetLoader.cpp b/src/render/assetLoader.cpp deleted file mode 100644 index 87e937f..0000000 --- a/src/render/assetLoader.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "assetLoader.h" - - - -void assetLoader::readDirectory(const std::string& directory, const std::string& pattern, std::map& filelist, bool recursive) -{ - std::string searchpattern(directory + "/" + pattern); - WIN32_FIND_DATA data; - HANDLE hFind; - if ((hFind = FindFirstFile(searchpattern.c_str(), &data)) != INVALID_HANDLE_VALUE) { - do { - std::string filename(data.cFileName); - filename.erase(filename.find_last_of("."), std::string::npos); - filelist[filename] = directory + "/" + data.cFileName; - } while (FindNextFile(hFind, &data) != 0); - FindClose(hFind); - } - if (recursive) { - std::string dirpattern = directory + "/*"; - if ((hFind = FindFirstFile(dirpattern.c_str(), &data)) != INVALID_HANDLE_VALUE) { - do { - if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - char subdir[MAX_PATH]; - strcpy(subdir, directory.c_str()); - strcat(subdir, "/"); - strcat(subdir, data.cFileName); - if ((strcmp(data.cFileName, ".") != 0) && (strcmp(data.cFileName, "..") != 0)) { - - readDirectory(subdir, pattern, filelist, recursive); - } - } - } while (FindNextFile(hFind, &data) != 0); - FindClose(hFind); - } - } - -} - -std::string assetLoader::getAssetPath() -{ - return "./../data/"; -} diff --git a/src/render/assetLoader.h b/src/render/assetLoader.h deleted file mode 100644 index 9f9f83c..0000000 --- a/src/render/assetLoader.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include "vulkan/vulkan.h" -#include "VulkanDevice.hpp" - - -namespace assetLoader -{ - - void readDirectory(const std::string& directory, const std::string& pattern, std::map& filelist, bool recursive); - std::string getAssetPath(); -}; - \ No newline at end of file