Commit current work
Reworked conditions, added uber-shaders, comparison nodes, fixed Discard
This commit is contained in:
@@ -36,6 +36,7 @@ namespace Nz
|
||||
std::shared_ptr<CommandPool> InstantiateCommandPool(QueueType queueType) override;
|
||||
std::shared_ptr<RenderPipeline> InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo) override;
|
||||
std::shared_ptr<RenderPipelineLayout> InstantiateRenderPipelineLayout(RenderPipelineLayoutInfo pipelineLayoutInfo) override;
|
||||
std::shared_ptr<ShaderStage> InstantiateShaderStage(const ShaderAst& shaderAst, const ShaderWriter::States& states) override;
|
||||
std::shared_ptr<ShaderStage> InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize) override;
|
||||
std::shared_ptr<Texture> InstantiateTexture(const TextureInfo& params) override;
|
||||
std::shared_ptr<TextureSampler> InstantiateTextureSampler(const TextureSamplerInfo& params) override;
|
||||
|
||||
@@ -52,9 +52,11 @@ namespace Nz
|
||||
void Release(ShaderBinding& binding);
|
||||
inline void TryToShrink();
|
||||
|
||||
static constexpr UInt32 InvalidIndex = 0xFFFFFFFF;
|
||||
|
||||
struct TextureDescriptor
|
||||
{
|
||||
UInt32 bindingIndex;
|
||||
UInt32 bindingIndex = InvalidIndex;
|
||||
GLuint texture;
|
||||
GLuint sampler;
|
||||
GL::TextureTarget textureTarget;
|
||||
@@ -62,7 +64,7 @@ namespace Nz
|
||||
|
||||
struct UniformBufferDescriptor
|
||||
{
|
||||
UInt32 bindingIndex;
|
||||
UInt32 bindingIndex = InvalidIndex;
|
||||
GLuint buffer;
|
||||
GLintptr offset;
|
||||
GLsizeiptr size;
|
||||
|
||||
@@ -12,13 +12,17 @@
|
||||
#include <Nazara/Renderer/ShaderStage.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Context.hpp>
|
||||
#include <Nazara/OpenGLRenderer/Wrapper/Shader.hpp>
|
||||
#include <Nazara/Shader/ShaderWriter.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class ShaderAst;
|
||||
|
||||
class NAZARA_OPENGLRENDERER_API OpenGLShaderStage : public ShaderStage
|
||||
{
|
||||
public:
|
||||
OpenGLShaderStage(OpenGLDevice& device, const ShaderAst& shaderAst, const ShaderWriter::States& states);
|
||||
OpenGLShaderStage(OpenGLDevice& device, ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize);
|
||||
OpenGLShaderStage(const OpenGLShaderStage&) = delete;
|
||||
OpenGLShaderStage(OpenGLShaderStage&&) noexcept = default;
|
||||
@@ -30,6 +34,9 @@ namespace Nz
|
||||
OpenGLShaderStage& operator=(OpenGLShaderStage&&) noexcept = default;
|
||||
|
||||
private:
|
||||
void CheckCompilationStatus();
|
||||
void Create(OpenGLDevice& device, const ShaderAst& shaderAst, const ShaderWriter::States& states);
|
||||
|
||||
GL::Shader m_shader;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ namespace Nz::GL
|
||||
{
|
||||
inline GL::WGLContext::WGLContext(const OpenGLDevice* device, const WGLLoader& loader) :
|
||||
Context(device),
|
||||
m_loader(loader)
|
||||
m_loader(loader),
|
||||
m_handle(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user