Renderer: Add ShaderStage class
This commit is contained in:
@@ -33,6 +33,20 @@ namespace Nz
|
||||
|
||||
RenderDeviceType_Max = RenderDeviceType_Unknown
|
||||
};
|
||||
|
||||
enum class ShaderLanguage
|
||||
{
|
||||
GLSL,
|
||||
HLSL,
|
||||
MSL,
|
||||
SpirV
|
||||
};
|
||||
|
||||
enum class ShaderStageType
|
||||
{
|
||||
Fragment,
|
||||
Vertex
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_ENUMS_RENDERER_HPP
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
#include <Nazara/Renderer/RenderPipeline.hpp>
|
||||
#include <Nazara/Utility/AbstractBuffer.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class Buffer;
|
||||
class ShaderStageImpl;
|
||||
|
||||
class NAZARA_RENDERER_API RenderDevice
|
||||
{
|
||||
@@ -25,6 +28,8 @@ namespace Nz
|
||||
|
||||
virtual std::unique_ptr<AbstractBuffer> InstantiateBuffer(Buffer* parent, BufferType type) = 0;
|
||||
virtual std::unique_ptr<RenderPipeline> InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo) = 0;
|
||||
virtual std::shared_ptr<ShaderStageImpl> InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize) = 0;
|
||||
std::shared_ptr<ShaderStageImpl> InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const std::filesystem::path& sourcePath);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
24
include/Nazara/Renderer/ShaderStageImpl.hpp
Normal file
24
include/Nazara/Renderer/ShaderStageImpl.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// 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_SHADERSTAGEIMPL_HPP
|
||||
#define NAZARA_RENDERER_SHADERSTAGEIMPL_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_RENDERER_API ShaderStageImpl
|
||||
{
|
||||
public:
|
||||
ShaderStageImpl() = default;
|
||||
virtual ~ShaderStageImpl();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_RENDERER_SHADERSTAGEIMPL_HPP
|
||||
Reference in New Issue
Block a user