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_RENDERER_COLOR_HPP_INCLUDED 00022 #define SGE_RENDERER_COLOR_HPP_INCLUDED 00023 00024 #include "../typeswitch.hpp" 00025 #include "../export.hpp" 00026 00027 #include <boost/gil/pixel.hpp> 00028 #include <boost/gil/rgba.hpp> 00029 #include <boost/gil/gray.hpp> 00030 00031 namespace sge 00032 { 00033 namespace renderer 00034 { 00035 00036 typedef uint8 pixel_channel_8; 00037 typedef float pixel_channel_f32; 00038 00039 typedef boost::gil::pixel< 00040 pixel_channel_8, 00041 boost::gil::rgba_layout_t 00042 > rgba8_pixel; 00043 00044 typedef rgba8_pixel const rgba8c_pixel; 00045 00046 typedef boost::gil::pixel< 00047 pixel_channel_8, 00048 boost::gil::argb_layout_t 00049 > argb8_pixel; 00050 00051 typedef argb8_pixel const argb8c_pixel; 00052 00053 typedef boost::gil::pixel< 00054 pixel_channel_f32, 00055 boost::gil::rgba_layout_t 00056 > rgba_f32_pixel; 00057 00058 typedef boost::gil::pixel< 00059 uint8, 00060 boost::gil::gray_layout_t 00061 > gray8_pixel; 00062 00063 #ifdef SGE_USE_ARGB 00064 typedef argb8_pixel color; 00065 typedef argb_f32_pixel colorf; 00066 #else 00067 typedef rgba8_pixel color; 00068 typedef rgba_f32_pixel colorf; 00069 #endif 00070 00071 SGE_SYMBOL color const make_color_rgba( 00072 pixel_channel_8 r, 00073 pixel_channel_8 g, 00074 pixel_channel_8 b, 00075 pixel_channel_8 a); 00076 00077 } 00078 } 00079 00080 #endif
1.5.5