summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_resource_manager.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-07 16:55:44 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commit3b26206dbdd36e53152f97726da372da2e1a9a84 (patch)
treeca7f3fbaf3fc3077835d493ea0ac34a67899032b /src/video_core/renderer_opengl/gl_resource_manager.cpp
parentDeglobalize Memory Manager on texture cahe and Implement Invalidation and Flushing using GPUVAddr (diff)
downloadyuzu-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 'src/video_core/renderer_opengl/gl_resource_manager.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_resource_manager.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_resource_manager.cpp b/src/video_core/renderer_opengl/gl_resource_manager.cpp
index bfe666a73..9f81c15cb 100644
--- a/src/video_core/renderer_opengl/gl_resource_manager.cpp
+++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp
@@ -33,6 +33,24 @@ void OGLTexture::Release() {
handle = 0;
}
+void OGLTextureView::Create() {
+ if (handle != 0)
+ return;
+
+ MICROPROFILE_SCOPE(OpenGL_ResourceCreation);
+ glGenTextures(1, &handle);
+}
+
+void OGLTextureView::Release() {
+ if (handle == 0)
+ return;
+
+ MICROPROFILE_SCOPE(OpenGL_ResourceDeletion);
+ glDeleteTextures(1, &handle);
+ OpenGLState::GetCurState().UnbindTexture(handle).Apply();
+ handle = 0;
+}
+
void OGLSampler::Create() {
if (handle != 0)
return;