65 lines
2.1 KiB
C++
65 lines
2.1 KiB
C++
// Copyright (C) 2020 Jérôme Leclercq
|
|
// This file is part of the "Nazara Engine - OpenGL Renderer"
|
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
|
|
|
#if 0
|
|
|
|
#include <Nazara/OpenGLRenderer/OpenGLDevice.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLCommandPool.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLRenderPipeline.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLRenderPipelineLayout.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLShaderStage.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLTexture.hpp>
|
|
#include <Nazara/OpenGLRenderer/OpenGLTextureSampler.hpp>
|
|
#include <Nazara/OpenGLRenderer/Debug.hpp>
|
|
|
|
namespace Nz
|
|
{
|
|
OpenGLDevice::~OpenGLDevice() = default;
|
|
|
|
std::unique_ptr<AbstractBuffer> OpenGLDevice::InstantiateBuffer(BufferType type)
|
|
{
|
|
return std::make_unique<OpenGLBuffer>(*this, type);
|
|
}
|
|
|
|
std::unique_ptr<CommandPool> OpenGLDevice::InstantiateCommandPool(QueueType queueType)
|
|
{
|
|
return std::make_unique<OpenGLCommandPool>(*this, queueType);
|
|
}
|
|
|
|
std::unique_ptr<RenderPipeline> OpenGLDevice::InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo)
|
|
{
|
|
return std::make_unique<OpenGLRenderPipeline>(*this, std::move(pipelineInfo));
|
|
}
|
|
|
|
std::shared_ptr<RenderPipelineLayout> OpenGLDevice::InstantiateRenderPipelineLayout(RenderPipelineLayoutInfo pipelineLayoutInfo)
|
|
{
|
|
auto pipelineLayout = std::make_shared<OpenGLRenderPipelineLayout>();
|
|
if (!pipelineLayout->Create(*this, std::move(pipelineLayoutInfo)))
|
|
return {};
|
|
|
|
return pipelineLayout;
|
|
}
|
|
|
|
std::shared_ptr<ShaderStageImpl> OpenGLDevice::InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize)
|
|
{
|
|
auto stage = std::make_shared<OpenGLShaderStage>();
|
|
if (!stage->Create(*this, type, lang, source, sourceSize))
|
|
return {};
|
|
|
|
return stage;
|
|
}
|
|
|
|
std::unique_ptr<Texture> OpenGLDevice::InstantiateTexture(const TextureInfo& params)
|
|
{
|
|
return std::make_unique<OpenGLTexture>(*this, params);
|
|
}
|
|
|
|
std::unique_ptr<TextureSampler> OpenGLDevice::InstantiateTextureSampler(const TextureSamplerInfo& params)
|
|
{
|
|
return std::make_unique<OpenGLTextureSampler>(*this, params);
|
|
}
|
|
}
|
|
|
|
#endif
|