rt64/examples/rhi_test.cpp
David Chavez 21cfeae50c
Standalone Graphics Test (#4)
* Add graphics test [WIP]

* Ignore IDEA files

* Explicit cast from size_t to uint64_t

* Build statically when buiding examples

* Remove unused file

* Runs on ARM64 Linux

* Update .gitignore
2024-05-14 21:35:45 -03:00

22 lines
667 B
C++

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