1.3.64
 
Loading...
Searching...
No Matches
BackendFactory.cpp
Go to the documentation of this file.
1
16#include "RayTracingBackend.h"
17#include "OptiX6Backend.h"
18
19// Future backend implementations
20// #include "OptiX7Backend.h"
21// #include "VulkanBackend.h"
22
23namespace helios {
24
25 std::unique_ptr<RayTracingBackend> RayTracingBackend::create(const std::string &backend_type) {
26
27 // OptiX 6.5 backend (current implementation)
28 if (backend_type == "optix6" || backend_type == "OptiX6" || backend_type == "optix" || backend_type == "OptiX") {
29 return std::make_unique<OptiX6Backend>();
30 }
31
32 // Future backends:
33
34 // OptiX 7.7 backend
35 // else if (backend_type == "optix7" || backend_type == "OptiX7") {
36 // return std::make_unique<OptiX7Backend>();
37 // }
38
39 // Vulkan ray-tracing backend
40 // else if (backend_type == "vulkan" || backend_type == "Vulkan") {
41 // return std::make_unique<VulkanBackend>();
42 // }
43
44 // Unknown backend type
45 else {
46 helios_runtime_error("ERROR (RayTracingBackend::create): Unknown ray tracing backend type '" + backend_type +
47 "'. "
48 "Supported backends: 'optix6' (OptiX 6.5)");
49 }
50
51 // Unreachable, but silence compiler warning
52 return nullptr;
53 }
54
55} // namespace helios