// Copyright (C) 2021 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Renderer module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_RENDERER_HPP #define NAZARA_RENDERER_HPP #include #include #include #include #include #include #include namespace Nz { class AbstractBuffer; class Buffer; class NAZARA_RENDERER_API Renderer : public ModuleBase { friend ModuleBase; public: using Dependencies = TypeList; struct Config; Renderer(Config /*config*/); ~Renderer(); inline RendererImpl* GetRendererImpl(); std::shared_ptr InstanciateRenderDevice(std::size_t deviceIndex, const RenderDeviceFeatures& enabledFeatures = {}); RenderAPI QueryAPI() const; std::string QueryAPIString() const; UInt32 QueryAPIVersion() const; const std::vector& QueryRenderDevices() const; struct Config { Nz::RenderAPI preferredAPI = RenderAPI::Unknown; }; private: void LoadBackend(const Config& config); std::unique_ptr m_rendererImpl; DynLib m_rendererLib; static Renderer* s_instance; }; } #include #endif // NAZARA_RENDERER_HPP