3 * Copyright (C) 2006-2007 Mathias Froehlich
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 #ifndef SG_SCENE_FEATURES_HXX
23 #define SG_SCENE_FEATURES_HXX
25 #include <simgear/structure/SGReferenced.hxx>
27 class SGSceneFeatures : public SGReferenced {
29 static SGSceneFeatures* instance();
31 void setEnablePointSpriteLights(bool enable)
32 { _pointSpriteLights = enable; }
33 bool getEnablePointSpriteLights(unsigned contextId) const
35 if (!_pointSpriteLights)
37 return getHavePointSprites(contextId);
40 void setEnableDistanceAttenuationLights(bool enable)
41 { _distanceAttenuationLights = enable; }
42 bool getEnableDistanceAttenuationLights(unsigned contextId) const
44 if (!_distanceAttenuationLights)
46 return getHavePointParameters(contextId);
49 void setEnableShaderLights(bool enable)
50 { _shaderLights = enable; }
51 bool getEnableShaderLights(unsigned contextId) const
55 return getHaveShaderPrograms(contextId);
59 bool getHavePointSprites(unsigned contextId) const;
60 bool getHaveFragmentPrograms(unsigned contextId) const;
61 bool getHaveVertexPrograms(unsigned contextId) const;
62 bool getHaveShaderPrograms(unsigned contextId) const;
63 bool getHavePointParameters(unsigned contextId) const;
67 SGSceneFeatures(const SGSceneFeatures&);
68 SGSceneFeatures& operator=(const SGSceneFeatures&);
71 bool _pointSpriteLights;
72 bool _distanceAttenuationLights;