70 lines
2.9 KiB
C++
70 lines
2.9 KiB
C++
#pragma once
|
|
|
|
#include <gz-util/settings_manager.hpp>
|
|
#include <gz-util/log.hpp>
|
|
|
|
#define VULKAN_HPP_NO_EXCEPTIONS
|
|
#define VULKAN_HPP_NO_CONSTRUCTORS
|
|
#include <vulkan/vulkan.hpp>
|
|
|
|
namespace gz::vlk::settings {
|
|
constexpr bool throwExceptionOnValidationError = true;
|
|
constexpr gz::Color VULKAN_MESSAGE_PREFIX_COLOR = gz::Color::BO_BLUE;
|
|
constexpr gz::Color VULKAN_MESSAGE_TIME_COLOR = gz::Color::BLUE;
|
|
const std::string CONFIG_FILE = "vulkan.conf";
|
|
|
|
/* const std::string MODEL_PATH = "models/gazebo-3d-model/gazebo.obj"; */
|
|
/* const std::string TEXTURE_PATH = "models/gazebo-3d-model/gazebo_diffuse.png"; */
|
|
|
|
const std::string MODEL_PATH = "models/armoire-3d-model/Armoire.obj";
|
|
/* const std::string MODEL_PATH = "models/bridge-3d-model/Bridge.obj"; */
|
|
const std::string TEXTURE_PATH = "models/armoire-3d-model/Armoire_diffuse.png";
|
|
|
|
#define VULKAN_SETTINGS_MAN_TYPES uint32_t, bool, float
|
|
const gz::util::unordered_string_map<std::string> INITIAL_SETTINGS = {
|
|
{ "framerate", "60" },
|
|
{ "anisotropy_enable", "false" },
|
|
{ "max_anisotropy", "1" },
|
|
{ "max_frames_in_flight", "3" },
|
|
/* { "", "" } */
|
|
};
|
|
constexpr vk::ClearColorValue missingTextureColor = { std::array<float, 4>{ 0.4f, 0.0f, 0.4f, 1.0f } };
|
|
|
|
constexpr std::array<const char*, 1> deviceExtensions = {
|
|
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
|
|
/* VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME */
|
|
};
|
|
|
|
// DEBUG
|
|
/**
|
|
* @brief Which message severities to log in VulkanInstance::debugLog()
|
|
*/
|
|
constexpr vk::DebugUtilsMessageSeverityFlagsEXT debugMessageSevereties =
|
|
vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
|
|
vk::DebugUtilsMessageSeverityFlagBitsEXT::eInfo |
|
|
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
|
|
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError;
|
|
|
|
/**
|
|
* @brief Which message types to log in VulkanInstance::debugLog()
|
|
*/
|
|
constexpr vk::DebugUtilsMessageTypeFlagsEXT debugMessageTypes =
|
|
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral |
|
|
vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation |
|
|
vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance;
|
|
|
|
// VALIDATION LAYERS
|
|
constexpr std::array<const char*, 1> validationLayers {
|
|
"VK_LAYER_KHRONOS_validation",
|
|
};
|
|
constexpr std::array<vk::ValidationFeatureEnableEXT, 3> validationFeaturesEnable {
|
|
vk::ValidationFeatureEnableEXT::eDebugPrintf,
|
|
vk::ValidationFeatureEnableEXT::eSynchronizationValidation,
|
|
vk::ValidationFeatureEnableEXT::eBestPractices
|
|
};
|
|
constexpr vk::ValidationFeaturesEXT validationFeatures {
|
|
.enabledValidationFeatureCount = static_cast<uint32_t>(validationFeaturesEnable.size()),
|
|
.pEnabledValidationFeatures = validationFeaturesEnable.data(),
|
|
};
|
|
} // namespace gz::vlk::setting
|