diff options
author | Liam <byteslice@airmail.cc> | 2024-01-15 21:08:21 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-01-31 17:27:21 +0100 |
commit | d4de04584f14f3ea8fde4cd79102b887c084fbc2 (patch) | |
tree | 72581b4240726f72d769319f3b5e1b2ece6c8e58 /src/video_core/renderer_opengl/present/util.h | |
parent | renderer_opengl: move out ownership of FSR resources (diff) | |
download | yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar.gz yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar.bz2 yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar.lz yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar.xz yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.tar.zst yuzu-d4de04584f14f3ea8fde4cd79102b887c084fbc2.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/present/util.h')
-rw-r--r-- | src/video_core/renderer_opengl/present/util.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/present/util.h b/src/video_core/renderer_opengl/present/util.h index 0aa8b110c..67f03aa27 100644 --- a/src/video_core/renderer_opengl/present/util.h +++ b/src/video_core/renderer_opengl/present/util.h @@ -29,4 +29,15 @@ static inline OGLSampler CreateBilinearSampler() { return sampler; } +static inline OGLSampler CreateNearestNeighborSampler() { + OGLSampler sampler; + sampler.Create(); + glSamplerParameteri(sampler.handle, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glSamplerParameteri(sampler.handle, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glSamplerParameteri(sampler.handle, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glSamplerParameteri(sampler.handle, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glSamplerParameteri(sampler.handle, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); + return sampler; +} + } // namespace OpenGL |