From bc16f7f3cce7b3a689f45697d9f6fbd970993e32 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 20 Aug 2018 19:22:43 -0400 Subject: renderer_base: Make creation of the rasterizer, the responsibility of the renderers themselves Given we use a base-class type within the renderer for the rasterizer (RasterizerInterface), we want to allow renderers to perform more complex initialization if they need to do such a thing. This makes it important to reserve type information. Given the OpenGL renderer is quite simple settings-wise, this is just a simple shuffling of the initialization code. For something like Vulkan however this might involve doing something like: // Initialize and call rasterizer-specific function that requires // the full type of the instance created. auto raster = std::make_unique(some, params); raster->CallSomeVulkanRasterizerSpecificFunction(); // Assign to base class variable rasterizer = std::move(raster) --- src/video_core/renderer_base.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/video_core/renderer_base.h') diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index d9f16b8e6..2a357f9d0 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -58,9 +58,6 @@ public: void RefreshBaseSettings(); protected: - /// Refreshes settings specific to the rasterizer. - void RefreshRasterizerSetting(); - Core::Frontend::EmuWindow& render_window; ///< Reference to the render window handle. std::unique_ptr rasterizer; f32 m_current_fps = 0.0f; ///< Current framerate, should be set by the renderer -- cgit v1.2.3