Files
our_dick/src/wip/ogl_resource_manager.cpp

59 lines
2.0 KiB
C++

/**
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 <http://www.gnu.org/licenses/>.
*/
#include "wip/ogl_resource_manager.hpp"
namespace wip::gfx::ogl{
resource_manager::resource_manager(void){
m_framebuffers.emplace_value("default");
}
auto resource_manager::shader_programs(void)const -> const container_type<::gfx::ogl::shader_program>&{
return m_shader_programs;
}
auto resource_manager::shader_programs(void) -> container_type<::gfx::ogl::shader_program>&{
return m_shader_programs;
}
auto resource_manager::shaders(void)const -> const container_type<::gfx::ogl::shader>&{
return m_shaders;
}
auto resource_manager::shaders(void) -> container_type<::gfx::ogl::shader>&{
return m_shaders;
}
auto resource_manager::textures(void)const -> const container_type<::gfx::ogl::texture>&{
return m_textures;
}
auto resource_manager::textures(void) -> container_type<::gfx::ogl::texture>&{
return m_textures;
}
auto resource_manager::texture_arrays(void)const -> const container_type<::gfx::ogl::texture_array>&{
return m_texture_arrays;
}
auto resource_manager::texture_arrays(void) -> container_type<::gfx::ogl::texture_array>&{
return m_texture_arrays;
}
auto resource_manager::framebuffers(void)const -> const container_type<::gfx::ogl::fbo>&{
return m_framebuffers;
}
auto resource_manager::framebuffers(void) -> container_type<::gfx::ogl::fbo>&{
return m_framebuffers;
}
}