Files
OpenVulkano/openVulkanoCpp/Host/PlatformProducer.hpp
2020-10-28 01:13:11 +01:00

40 lines
1.1 KiB
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "Base/PlatformEnums.hpp"
namespace openVulkanoCpp
{
class IPlatform;
class IRenderer;
/**
* \brief Helper class the produces all the platform depending classes
*/
class PlatformProducer
{
public:
/**
* \brief Creates the renderer for the given render api
* \param renderApi The render api that should be used
* \return The created Renderer.
* \throws std::runtime_error if the render api is not supported
*/
static IRenderer* CreateRenderManager(RenderAPI::RenderApi renderApi);
/**
* \brief Creates a platform that fits best for the current environment
* \param renderApi The render api that should be used when searching for the best suited platform provider
* \return The created platform
* \throws std::runtime_error if the render api is not supported
*/
static IPlatform* CreatePlatform(RenderAPI::RenderApi renderApi);
};
}