mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-01 20:13:40 +00:00
Yellow squiggly lines begone! Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes. If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed. The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports. Not everything is removed, but the cleanup should be substantial enough. Because this done on Linux, code that isn't used on it is mostly untouched. (Hopefully no open PR is depending on these imports...)
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "Common/GL/GLExtensions/GLExtensions.h"
|
|
#include "VideoCommon/AbstractShader.h"
|
|
|
|
namespace OGL
|
|
{
|
|
class OGLShader final : public AbstractShader
|
|
{
|
|
public:
|
|
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id, std::string source,
|
|
std::string name);
|
|
explicit OGLShader(GLuint gl_compute_program_id, std::string source, std::string name);
|
|
~OGLShader() override;
|
|
|
|
u64 GetID() const { return m_id; }
|
|
GLenum GetGLShaderType() const { return m_type; }
|
|
GLuint GetGLShaderID() const { return m_gl_id; }
|
|
GLuint GetGLComputeProgramID() const { return m_gl_compute_program_id; }
|
|
const std::string& GetSource() const { return m_source; }
|
|
|
|
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, std::string_view source,
|
|
VideoCommon::ShaderIncluder* shader_includer,
|
|
std::string_view name);
|
|
|
|
private:
|
|
u64 m_id;
|
|
GLenum m_type;
|
|
GLuint m_gl_id = 0;
|
|
GLuint m_gl_compute_program_id = 0;
|
|
std::string m_source;
|
|
std::string m_name;
|
|
};
|
|
|
|
} // namespace OGL
|