diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-24 02:23:54 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-24 02:23:54 +0200 |
commit | 0eaf7e1daafb6789d40fd760cc022f3ec91301c4 (patch) | |
tree | 4866fd69a9173fbd8f0ced29e3ddd7f87deb7b35 /src/video_core/renderer_opengl/gl_resource_manager.cpp | |
parent | Merge pull request #4559 from lioncash/webresult (diff) | |
download | yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar.gz yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar.bz2 yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar.lz yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar.xz yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.tar.zst yuzu-0eaf7e1daafb6789d40fd760cc022f3ec91301c4.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_resource_manager.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_resource_manager.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp index a787e27d2..0ebcec427 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <string_view> #include <utility> #include <glad/glad.h> #include "common/common_types.h" @@ -82,11 +83,13 @@ void OGLSampler::Release() { handle = 0; } -void OGLShader::Create(const char* source, GLenum type) { - if (handle != 0) +void OGLShader::Create(std::string_view source, GLenum type) { + if (handle != 0) { return; - if (source == nullptr) + } + if (source.empty()) { return; + } MICROPROFILE_SCOPE(OpenGL_ResourceCreation); handle = GLShader::LoadShader(source, type); |