/** This file is a part of our_dick Copyright (C) 2022 rexy712 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifndef OUR_DICK_GRAPHICS_WIP_OGL_RESOURCE_MANAGER_HPP #define OUR_DICK_GRAPHICS_WIP_OGL_RESOURCE_MANAGER_HPP #include "gfx/resource_container.hpp" #include "gfx/ogl/shader_program.hpp" #include "gfx/ogl/texture.hpp" #include "gfx/ogl/fbo.hpp" namespace wip::gfx::ogl{ class resource_manager { public: template using container_type = ::gfx::resource_container; protected: container_type<::gfx::ogl::shader_program> m_shader_programs; container_type<::gfx::ogl::shader_stage> m_shader_stages; container_type<::gfx::ogl::texture> m_textures; container_type<::gfx::ogl::texture_array> m_texture_arrays; container_type<::gfx::ogl::fbo> m_framebuffers; public: resource_manager(void); const container_type<::gfx::ogl::shader_program>& shader_programs(void)const; container_type<::gfx::ogl::shader_program>& shader_programs(void); const container_type<::gfx::ogl::shader_stage>& shader_stages(void)const; container_type<::gfx::ogl::shader_stage>& shader_stages(void); const container_type<::gfx::ogl::texture>& textures(void)const; container_type<::gfx::ogl::texture>& textures(void); const container_type<::gfx::ogl::texture_array>& texture_arrays(void)const; container_type<::gfx::ogl::texture_array>& texture_arrays(void); const container_type<::gfx::ogl::fbo>& framebuffers(void)const; container_type<::gfx::ogl::fbo>& framebuffers(void); }; } #endif