mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 02:09:06 +00:00
VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
Greatly simplifies the overall interface when it comes to compiling shaders. Also allows getting rid of a std::string overload of the same name. Now std::string and const char* both go through the same function.
This commit is contained in:
parent
80d8173d29
commit
e60268bd42
25 changed files with 94 additions and 117 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
|
@ -26,8 +27,7 @@ public:
|
|||
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, const char* source,
|
||||
size_t length);
|
||||
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, std::string_view source);
|
||||
|
||||
private:
|
||||
u64 m_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue