mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
VideoBackends: Add AbstractShader and AbstractPipeline classes
This commit is contained in:
38
Source/Core/VideoBackends/OGL/OGLShader.h
Normal file
38
Source/Core/VideoBackends/OGL/OGLShader.h
Normal file
@ -0,0 +1,38 @@
|
||||
// Copyright 2017 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
#include "VideoCommon/AbstractShader.h"
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
class OGLShader final : public AbstractShader
|
||||
{
|
||||
public:
|
||||
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint shader_id);
|
||||
explicit OGLShader(GLuint compute_program_id);
|
||||
~OGLShader() override;
|
||||
|
||||
GLenum GetGLShaderType() const { return m_type; }
|
||||
GLuint GetGLShaderID() const { return m_id; }
|
||||
GLuint GetGLComputeProgramID() const { return m_compute_program_id; }
|
||||
bool HasBinary() const override;
|
||||
BinaryData GetBinary() const override;
|
||||
|
||||
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, const char* source,
|
||||
size_t length);
|
||||
|
||||
private:
|
||||
GLenum m_type;
|
||||
GLuint m_id;
|
||||
GLuint m_compute_program_id;
|
||||
};
|
||||
|
||||
} // namespace OGL
|
Reference in New Issue
Block a user