00001 00008 /* 00009 This file is part of Teapot Colony Wars. 00010 00011 Teapot Colony Wars is free software: you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation, either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 Teapot Colony Wars is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with Teapot Colony Wars. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00025 #ifndef GENCOLOR_H 00026 #define GENCOLOR_H 00027 00028 #include <GL/glut.h> 00029 00033 class GenColor 00034 { 00035 protected: 00036 00038 static GenColor *_instance; 00039 00041 static unsigned int _nb_colors; 00042 00044 static float _factor; 00045 00049 GenColor(); 00050 00051 public: 00052 00056 virtual ~GenColor(); 00057 00063 static GenColor* instance(); 00064 00068 static void destroy(); 00069 00075 GLubyte* getNewColor(); 00076 }; 00077 00078 #endif // GENCOLOR_H