diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-07-27 06:21:14 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-14 02:25:55 +0100 |
commit | 3217400dd1c42cf04c4bf5b25bfc07e67e20773a (patch) | |
tree | 8027df5868deb48fcddf24762d977613f127d1ad /src/video_core/renderer_opengl/gl_resource_manager.cpp | |
parent | Merge pull request #3395 from FernandoS27/queries (diff) | |
download | yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar.gz yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar.bz2 yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar.lz yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar.xz yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.tar.zst yuzu-3217400dd1c42cf04c4bf5b25bfc07e67e20773a.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 | 17 |
1 files changed, 17 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 5c96c1d46..f0ddfb276 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.cpp +++ b/src/video_core/renderer_opengl/gl_resource_manager.cpp @@ -207,4 +207,21 @@ void OGLFramebuffer::Release() { handle = 0; } +void OGLQuery::Create(GLenum target) { + if (handle != 0) + return; + + MICROPROFILE_SCOPE(OpenGL_ResourceCreation); + glCreateQueries(target, 1, &handle); +} + +void OGLQuery::Release() { + if (handle == 0) + return; + + MICROPROFILE_SCOPE(OpenGL_ResourceDeletion); + glDeleteQueries(1, &handle); + handle = 0; +} + } // namespace OpenGL |