Core: Add Vulkan renderer types

This commit is contained in:
Connor McLaughlin 2020-06-19 00:18:14 +10:00
parent 1399e95b77
commit 3cd5b7ae74
4 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "types.h"
// Contains the information required to create a graphics context in a window. // Contains the information required to create a graphics context in a window.
struct WindowInfo struct WindowInfo

View File

@ -24,6 +24,7 @@ public:
{ {
None, None,
D3D11, D3D11,
Vulkan,
OpenGL, OpenGL,
OpenGLES OpenGLES
}; };

View File

@ -313,16 +313,16 @@ const char* Settings::GetCPUExecutionModeDisplayName(CPUExecutionMode mode)
return s_cpu_execution_mode_display_names[static_cast<u8>(mode)]; return s_cpu_execution_mode_display_names[static_cast<u8>(mode)];
} }
static std::array<const char*, 3> s_gpu_renderer_names = {{ static std::array<const char*, 4> s_gpu_renderer_names = {{
#ifdef WIN32 #ifdef WIN32
"D3D11", "D3D11",
#endif #endif
"OpenGL", "Software"}}; "Vulkan", "OpenGL", "Software"}};
static std::array<const char*, 3> s_gpu_renderer_display_names = {{ static std::array<const char*, 4> s_gpu_renderer_display_names = {{
#ifdef WIN32 #ifdef WIN32
"Hardware (D3D11)", "Hardware (D3D11)",
#endif #endif
"Hardware (OpenGL)", "Software"}}; "Hardware (Vulkan)", "Hardware (OpenGL)", "Software"}};
std::optional<GPURenderer> Settings::ParseRendererName(const char* str) std::optional<GPURenderer> Settings::ParseRendererName(const char* str)
{ {

View File

@ -53,6 +53,7 @@ enum class GPURenderer : u8
#ifdef WIN32 #ifdef WIN32
HardwareD3D11, HardwareD3D11,
#endif #endif
HardwareVulkan,
HardwareOpenGL, HardwareOpenGL,
Software, Software,
Count Count