2024-01-20 14:14:50 +00:00
|
|
|
#include "rhi/rt64_render_interface.h"
|
|
|
|
|
|
|
|
namespace RT64 {
|
|
|
|
extern std::unique_ptr<RenderInterface> CreateD3D12Interface();
|
|
|
|
extern std::unique_ptr<RenderInterface> CreateVulkanInterface();
|
|
|
|
}
|
|
|
|
|
2024-05-15 00:35:45 +00:00
|
|
|
int main(int argc, char** argv) {
|
|
|
|
std::unique_ptr<RT64::RenderInterface> renderInterface = RT64::CreateVulkanInterface();
|
2024-01-20 14:14:50 +00:00
|
|
|
|
2024-05-15 00:35:45 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
// Windows only: Can also use D3D12.
|
2024-01-20 14:14:50 +00:00
|
|
|
const bool useVulkan = true;
|
2024-05-15 00:35:45 +00:00
|
|
|
if (!useVulkan) {
|
2024-01-20 14:14:50 +00:00
|
|
|
renderInterface = RT64::CreateD3D12Interface();
|
|
|
|
}
|
2024-05-15 00:35:45 +00:00
|
|
|
#endif
|
2024-01-20 14:14:50 +00:00
|
|
|
|
|
|
|
// Execute a blocking test that creates a window and draws some geometry to test the render interface.
|
|
|
|
RT64::RenderInterfaceTest(renderInterface.get());
|
|
|
|
}
|