From c2e5d2468ad6a38cdb8a067da0678302f6cc6066 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 13 Sep 2019 15:59:15 -0400 Subject: Refactor render-test to make cross platform (#1053) * First pass of render-test refactor. * Make window construction a function that can choose an implementation. * Remove OpenGL as currently has windows dependency. * Disable Vulkan as Renderer impl has dependency on windows. * Pass Window in as parameter of 'update'. * Add win-window.cpp as was missing. * Fix warning on windows about signs during comparison. --- tools/render-test/window.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/render-test/window.cpp (limited to 'tools/render-test/window.cpp') diff --git a/tools/render-test/window.cpp b/tools/render-test/window.cpp new file mode 100644 index 000000000..0ab4ff412 --- /dev/null +++ b/tools/render-test/window.cpp @@ -0,0 +1,21 @@ +// window.cpp + +#include "window.h" + +namespace renderer_test { +using namespace Slang; + +#if SLANG_WINDOWS_FAMILY +extern Window* createWinWindow(); +#endif + +/* static */Window* Window::create() +{ +#if SLANG_WINDOWS_FAMILY + return createWinWindow(); +#else + return nullptr; +#endif +} + +} // renderer_test -- cgit v1.2.3