Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

StelTextureParams.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) 2012 Ferdinand Majerech
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU 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 General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
00018  */
00019 
00020 #ifndef _STELTEXTUREPARAMS_HPP_
00021 #define _STELTEXTUREPARAMS_HPP_
00022 
00027 enum TextureFiltering
00028 {
00030     TextureFiltering_Nearest,
00032     TextureFiltering_Linear
00033 };
00034 
00039 enum TextureWrap
00040 {
00042     TextureWrap_Repeat,
00044     TextureWrap_ClampToEdge
00045 };
00046 
00064 struct TextureParams 
00065 {
00069     TextureParams()
00070         :autoGenerateMipmaps(false)
00071         ,filteringMode(TextureFiltering_Linear)
00072         ,wrapMode(TextureWrap_ClampToEdge)
00073     {
00074     }
00075 
00077     TextureParams& generateMipmaps()
00078     {
00079         autoGenerateMipmaps = true;
00080         return *this;
00081     }
00082 
00084     TextureParams& filtering(const TextureFiltering filtering)
00085     {
00086         this->filteringMode = filtering;
00087         return *this;
00088     }
00089 
00091     TextureParams& wrap(const TextureWrap wrap)
00092     {
00093         this->wrapMode = wrap;
00094         return *this;
00095     }
00096 
00101     bool autoGenerateMipmaps;
00102 
00107     TextureFiltering filteringMode;
00108 
00110     TextureWrap wrapMode;
00111 };
00112 
00113 #endif // _STELTEXTUREPARAMS_HPP_
Generated on Thu Jan 31 14:05:40 2013 for Stellarium by  doxygen 1.6.3