mirror of
https://github.com/rt64/rt64.git
synced 2024-11-19 14:14:37 +00:00
21cfeae50c
* 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
22 lines
667 B
C++
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());
|
|
}
|