00001 /* 00002 spacegameengine is a portable easy to use game engine written in C++. 00003 Copyright (C) 2006-2007 Carl Philipp Reh (sefi@s-e-f-i.de) 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public License 00007 as published by the Free Software Foundation; either version 2 00008 of the License, or (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 */ 00019 00020 00021 #ifndef SGE_ATLASING_HPP_INCLUDED 00022 #define SGE_ATLASING_HPP_INCLUDED 00023 00024 #include "../renderer/texture.hpp" 00025 #include "../renderer/device.hpp" 00026 00027 namespace sge 00028 { 00029 namespace texture 00030 { 00031 00032 bool need_atlasing( 00033 renderer::texture::size_type); 00034 00035 bool need_atlasing( 00036 const renderer::texture::dim_type&); 00037 00038 renderer::texture::size_type 00039 atlased_bound( 00040 renderer::texture::size_type); 00041 00042 const renderer::texture::dim_type 00043 atlased_bounds( 00044 const renderer::texture::dim_type&); 00045 00046 renderer::texture::size_type atlased_gap(); 00047 00048 renderer::texture::size_type 00049 atlased_size( 00050 renderer::texture::size_type, 00051 bool force_atlasing = false); 00052 00053 const renderer::texture::dim_type 00054 atlased_size( 00055 const renderer::texture::dim_type&, 00056 bool force_atlasing = false); 00057 00058 const renderer::texture::dim_type 00059 atlased_texture_dim( 00060 renderer::device_ptr rend); 00061 00062 const renderer::texture_ptr 00063 atlased_texture( 00064 renderer::device_ptr rend, 00065 const renderer::filter_args& filter); 00066 00067 const renderer::lock_rect 00068 inner_atlased_rect( 00069 renderer::lock_rect, 00070 bool need_atlasing_w, 00071 bool need_atlasing_h); 00072 00073 void atlas_w( 00074 renderer::texture_ptr, 00075 renderer::const_image_view const &src, 00076 renderer::lock_rect const &outer_area); 00077 00078 void atlas_h( 00079 renderer::texture_ptr, 00080 renderer::const_image_view const &src, 00081 renderer::lock_rect const &outer_area); 00082 00083 } 00084 } 00085 00086 #endif
1.5.5