rtengine/src/renderer/dx11/init.cpp
Kevin Trogant 3b5f7d0029
Some checks failed
Ubuntu Cross to Win64 / Cross Compile with ming64 (1.4.0, ubuntu-latest) (push) Has been cancelled
fix(dx11): Fix compilation error due to renames
2024-07-31 21:38:35 +02:00

31 lines
876 B
C++

#include "renderer/backend_api.h"
#include "device.hpp"
void Dx11RegisterCVARs(void) {
}
rt_render_backend_init_result Dx11Init(const rt_renderer_window_info *info) {
rt_result res = rt_dx11_device::GetInstance()->Initialize(info);
rt_render_device_i iface = {reinterpret_cast<void*>(rt_dx11_device::GetInstance()), nullptr};
rt_render_backend_init_result result = {.result = res, .device = iface};
if (res != RT_SUCCESS)
return result;
return result;
}
void Dx11Shutdown(void) {
rt_dx11_device::GetInstance()->Shutdown();
}
// Called by the application to retrieve the renderer api
extern "C" RT_DLLEXPORT rt_render_backend_api rtLoadRenderBackendImpl(void) {
rt_render_backend_api api = {
.RegisterCVARs = Dx11RegisterCVARs,
.Init = Dx11Init,
.Shutdown = Dx11Shutdown,
};
return api;
}