osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarth/Capabilities

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003 * Copyright 2008-2010 Pelican Mapping
00004 * http://osgearth.org
00005 *
00006 * osgEarth is free software; you can redistribute it and/or modify
00007 * it under the terms of the GNU Lesser General Public License as published by
00008 * the Free Software Foundation; either version 2 of the License, or
00009 * (at your option) any later version.
00010 *
00011 * This program is distributed in the hope that it will be useful,
00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 * GNU Lesser General Public License for more details.
00015 *
00016 * You should have received a copy of the GNU Lesser General Public License
00017 * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018 */
00019 
00020 #ifndef OSGEARTH_CAPABILITIES_H
00021 #define OSGEARTH_CAPABILITIES_H 1
00022 
00023 #include <osgEarth/Common>
00024 
00025 namespace osgEarth
00026 {
00032     class OSGEARTH_EXPORT Capabilities : public osg::Referenced
00033     {
00034     public:
00036         int getMaxFFPTextureUnits() const { return _maxFFPTextureUnits; }
00037 
00039         int getMaxGPUTextureUnits() const { return _maxGPUTextureUnits; }
00040 
00042         int getMaxGPUTextureCoordSets() const { return _maxGPUTextureCoordSets; }
00043 
00045         int getMaxTextureSize() const { return _maxTextureSize; }
00046 
00048         int getMaxFastTextureSize() const { return _maxFastTextureSize; }
00049 
00051         int getMaxLights() const { return _maxLights; }
00052 
00054         bool supportsGLSL(float minimumVersion =1.0f) const { 
00055             return _supportsGLSL && _GLSLversion >= minimumVersion; }
00056 
00058         float getGLSLVersion() const { return _GLSLversion; }
00059 
00061         bool supportsTextureArrays() const { return _supportsTextureArrays; }
00062 
00064         bool supportsTexture3D() const { return _supportsTexture3D; }
00065 
00067         bool supportsMultiTexture() const { return _supportsMultiTexture; }
00068 
00070         bool supportsStencilWrap() const { return _supportsStencilWrap; }
00071 
00073         bool supportsTwoSidedStencil() const { return _supportsTwoSidedStencil; }
00074 
00076         bool supportsTexture2DLod() const { return _supportsTexture2DLod; }
00077 
00079         bool supportsMipmappedTextureUpdates() const { return _supportsMipmappedTextureUpdates; }
00080 
00081     private:
00082         Capabilities();
00083 
00084     private:
00085         int  _maxFFPTextureUnits;
00086         int  _maxGPUTextureUnits;
00087         int  _maxGPUTextureCoordSets;
00088         int  _maxTextureSize;
00089         int  _maxFastTextureSize;
00090         int  _maxLights;
00091         bool _supportsGLSL;
00092         float _GLSLversion;
00093         bool _supportsTextureArrays;
00094         bool _supportsTexture3D;
00095         bool _supportsMultiTexture;
00096         bool _supportsStencilWrap;
00097         bool _supportsTwoSidedStencil;
00098         bool _supportsTexture2DLod;
00099         bool _supportsMipmappedTextureUpdates;
00100         std::string _vendor;
00101         std::string _renderer;
00102         std::string _version;
00103 
00104     public:
00105         friend class Registry;
00106     };
00107 }
00108 
00109 #endif // OSGEARTH_CAPABILITIES_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines