// Copyright (C) 2023 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - OpenGL renderer" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_OPENGLRENDERER_OPENGLTEXTURESAMPLER_HPP #define NAZARA_OPENGLRENDERER_OPENGLTEXTURESAMPLER_HPP #include #include #include #include namespace Nz { class NAZARA_OPENGLRENDERER_API OpenGLTextureSampler : public TextureSampler { public: OpenGLTextureSampler(OpenGLDevice& device, TextureSamplerInfo samplerInfo); OpenGLTextureSampler(const OpenGLTextureSampler&) = delete; OpenGLTextureSampler(OpenGLTextureSampler&&) = delete; ~OpenGLTextureSampler() = default; inline const GL::Sampler& GetSampler(bool mipmaps) const; void UpdateDebugName(std::string_view name) override; OpenGLTextureSampler& operator=(const OpenGLTextureSampler&) = delete; OpenGLTextureSampler& operator=(OpenGLTextureSampler&&) = delete; private: static void BuildSampler(OpenGLDevice& device, GL::Sampler& sampler, const TextureSamplerInfo& samplerInfo, bool withMipmaps); GL::Sampler m_samplerWithMipmaps; GL::Sampler m_samplerWithoutMipmaps; }; } #include #endif // NAZARA_OPENGLRENDERER_OPENGLTEXTURESAMPLER_HPP