Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreRenderSystemCapabilities.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://www.ogre3d.org/
00006 
00007 Copyright © 2000-2003 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 #ifndef __RenderSystemCapabilities__
00026 #define __RenderSystemCapabilities__ 1
00027 
00028 // Precompiler options
00029 #include "OgrePrerequisites.h"
00030 #include "OgreString.h"
00031 
00032 namespace Ogre {
00033 
00035     enum Capabilities
00036     {
00037         //RSC_MULTITEXTURE          = 0x00000001,
00038         RSC_AUTOMIPMAP              = 0x00000002,
00039         RSC_BLENDING                = 0x00000004,
00040         RSC_ANISOTROPY              = 0x00000008,
00041         RSC_DOT3                    = 0x00000010,
00042         RSC_CUBEMAPPING             = 0x00000020,
00043         RSC_HWSTENCIL               = 0x00000040,
00044         RSC_VBO                     = 0x00000080,
00045         RSC_VERTEXBLENDING          = 0x00000100,
00046         RSC_VERTEX_PROGRAM          = 0x00000200,
00047         RSC_FRAGMENT_PROGRAM        = 0x00000400,
00048         RSC_TEXTURE_COMPRESSION     = 0x00000800,
00049         RSC_TEXTURE_COMPRESSION_DXT = 0x00001000,
00050         RSC_TEXTURE_COMPRESSION_VTC = 0x00002000
00051     };
00052 
00058     class _OgreExport RenderSystemCapabilities 
00059     {
00060         private:
00062             ushort mNumWorldMatrices;
00064             ushort mNumTextureUnits;
00066             ushort mStencilBufferBitDepth;
00068             ushort mNumVertexBlendMatrices;
00070             int mCapabilities;
00072             String mMaxVertexProgramVersion;
00074             String mMaxFragmentProgramVersion;
00076             ushort mVertexProgramConstantFloatCount;           
00078             ushort mVertexProgramConstantIntCount;           
00080             ushort mVertexProgramConstantBoolCount;           
00082             ushort mFragmentProgramConstantFloatCount;           
00084             ushort mFragmentProgramConstantIntCount;           
00086             ushort mFragmentProgramConstantBoolCount;
00087 
00088         public: 
00089             RenderSystemCapabilities ();
00090             ~RenderSystemCapabilities ();
00091 
00092             void setNumWorldMatricies(ushort num)
00093             {
00094                 mNumWorldMatrices = num;
00095             }
00096 
00097             void setNumTextureUnits(ushort num)
00098             {
00099                 mNumTextureUnits = num;
00100             }
00101 
00102             void setStencilBufferBitDepth(ushort num)
00103             {
00104                 mStencilBufferBitDepth = num;
00105             }
00106 
00107             void setNumVertexBlendMatrices(ushort num)
00108             {
00109                 mNumVertexBlendMatrices = num;
00110             }
00111 
00112             ushort getNumWorldMatricies(void) const
00113             { 
00114                 return mNumWorldMatrices;
00115             }
00116 
00127             ushort getNumTextureUnits(void) const
00128             {
00129                 return mNumTextureUnits;
00130             }
00131 
00138             ushort getStencilBufferBitDepth(void) const
00139             {
00140                 return mStencilBufferBitDepth;
00141             }
00142 
00145             ushort numVertexBlendMatrices(void) const
00146             {
00147                 return mNumVertexBlendMatrices;
00148             }
00149 
00152             void setCapability(const Capabilities c) 
00153             { 
00154                 mCapabilities |= c;
00155             }
00156 
00159             bool hasCapability(const Capabilities c) const
00160             {
00161                 if(mCapabilities & c)
00162                 {
00163                     return true;
00164                 }
00165                 else
00166                 {
00167                     return false;
00168                 }
00169             }
00171             const String& getMaxVertexProgramVersion(void) const
00172             {
00173                 return mMaxVertexProgramVersion;
00174             }
00176             const String& getMaxFragmentProgramVersion(void) const
00177             {
00178                 return mMaxFragmentProgramVersion;
00179             }
00181             ushort getVertexProgramConstantFloatCount(void) const
00182             {
00183                 return mVertexProgramConstantFloatCount;           
00184             }
00186             ushort getVertexProgramConstantIntCount(void) const
00187             {
00188                 return mVertexProgramConstantIntCount;           
00189             }
00191             ushort getVertexProgramConstantBoolCount(void) const
00192             {
00193                 return mVertexProgramConstantBoolCount;           
00194             }
00196             ushort getFragmentProgramConstantFloatCount(void) const
00197             {
00198                 return mFragmentProgramConstantFloatCount;           
00199             }
00201             ushort getFragmentProgramConstantIntCount(void) const
00202             {
00203                 return mFragmentProgramConstantIntCount;           
00204             }
00206             ushort getFragmentProgramConstantBoolCount(void) const
00207             {
00208                 return mFragmentProgramConstantBoolCount;           
00209             }
00210 
00211 
00212 
00214             void setMaxVertexProgramVersion(const String& ver)
00215             {
00216                 mMaxVertexProgramVersion = ver;
00217             }
00219             void setMaxFragmentProgramVersion(const String& ver)
00220             {
00221                 mMaxFragmentProgramVersion = ver;
00222             }
00224             void setVertexProgramConstantFloatCount(ushort c)
00225             {
00226                 mVertexProgramConstantFloatCount = c;           
00227             }
00229             void setVertexProgramConstantIntCount(ushort c)
00230             {
00231                 mVertexProgramConstantIntCount = c;           
00232             }
00234             void setVertexProgramConstantBoolCount(ushort c)
00235             {
00236                 mVertexProgramConstantBoolCount = c;           
00237             }
00239             void setFragmentProgramConstantFloatCount(ushort c)
00240             {
00241                 mFragmentProgramConstantFloatCount = c;           
00242             }
00244             void setFragmentProgramConstantIntCount(ushort c)
00245             {
00246                 mFragmentProgramConstantIntCount = c;           
00247             }
00249             void setFragmentProgramConstantBoolCount(ushort c)
00250             {
00251                 mFragmentProgramConstantBoolCount = c;           
00252             }
00253 
00255             void log(Log* pLog);
00256 
00257 
00258 
00259 
00260     };
00261 };
00262 
00263 #endif // __RenderSystemCapabilities__
00264 

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:25 2004