diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-05-07 16:55:44 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:36:12 +0200 |
commit | 3b26206dbdd36e53152f97726da372da2e1a9a84 (patch) | |
tree | ca7f3fbaf3fc3077835d493ea0ac34a67899032b /src/video_core/renderer_opengl/gl_resource_manager.h | |
parent | Deglobalize Memory Manager on texture cahe and Implement Invalidation and Flushing using GPUVAddr (diff) | |
download | yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar.gz yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar.bz2 yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar.lz yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar.xz yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.tar.zst yuzu-3b26206dbdd36e53152f97726da372da2e1a9a84.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_resource_manager.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h index fbb93ee49..310ee2bf3 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.h +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -36,6 +36,31 @@ public: GLuint handle = 0; }; +class OGLTextureView : private NonCopyable { +public: + OGLTextureView() = default; + + OGLTextureView(OGLTextureView&& o) noexcept : handle(std::exchange(o.handle, 0)) {} + + ~OGLTextureView() { + Release(); + } + + OGLTextureView& operator=(OGLTextureView&& o) noexcept { + Release(); + handle = std::exchange(o.handle, 0); + return *this; + } + + /// Creates a new internal OpenGL resource and stores the handle + void Create(); + + /// Deletes the internal OpenGL resource + void Release(); + + GLuint handle = 0; +}; + class OGLSampler : private NonCopyable { public: OGLSampler() = default; |