# 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 (c) 2000-2005 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,
    00039         RSC_AUTOMIPMAP              = 0x00000002,
    00040         RSC_BLENDING                = 0x00000004,
    00042         RSC_ANISOTROPY              = 0x00000008,
    00044         RSC_DOT3                    = 0x00000010,
    00046         RSC_CUBEMAPPING             = 0x00000020,
    00048         RSC_HWSTENCIL               = 0x00000040,
    00050         RSC_VBO                     = 0x00000080,
    00052         RSC_VERTEX_PROGRAM          = 0x00000200,
    00054         RSC_FRAGMENT_PROGRAM        = 0x00000400,
    00056         RSC_TEXTURE_COMPRESSION     = 0x00000800,
    00058         RSC_TEXTURE_COMPRESSION_DXT = 0x00001000,
    00060         RSC_TEXTURE_COMPRESSION_VTC = 0x00002000,
    00062         RSC_SCISSOR_TEST            = 0x00004000,
    00064         RSC_TWO_SIDED_STENCIL       = 0x00008000,
    00066         RSC_STENCIL_WRAP            = 0x00010000,
    00068         RSC_HWOCCLUSION             = 0x00020000,
    00070         RSC_USER_CLIP_PLANES        = 0x00040000,
    00072         RSC_VERTEX_FORMAT_UBYTE4    = 0x00080000,
    00074         RSC_INFINITE_FAR_PLANE      = 0x00100000,
    00076         RSC_HWRENDER_TO_TEXTURE     = 0x00200000,
    00078         RSC_TEXTURE_FLOAT           = 0x00400000,
    00080         RSC_NON_POWER_OF_2_TEXTURES = 0x00800000,
    00082         RSC_TEXTURE_3D              = 0x01000000
    00083     };
    00084
    00090     class _OgreExport RenderSystemCapabilities
    00091     {
    00092         private:
    00094             ushort mNumWorldMatrices;
    00096             ushort mNumTextureUnits;
    00098             ushort mStencilBufferBitDepth;
    00100             ushort mNumVertexBlendMatrices;
    00102             int mCapabilities;
    00104             String mMaxVertexProgramVersion;
    00106             String mMaxFragmentProgramVersion;
    00108             ushort mVertexProgramConstantFloatCount;
    00110             ushort mVertexProgramConstantIntCount;
    00112             ushort mVertexProgramConstantBoolCount;
    00114             ushort mFragmentProgramConstantFloatCount;
    00116             ushort mFragmentProgramConstantIntCount;
    00118             ushort mFragmentProgramConstantBoolCount;
    00119
    00120         public:
    00121             RenderSystemCapabilities ();
    00122             ~RenderSystemCapabilities ();
    00123
    00124             void setNumWorldMatricies(ushort num)
    00125             {
    00126                 mNumWorldMatrices = num;
    00127             }
    00128
    00129             void setNumTextureUnits(ushort num)
    00130             {
    00131                 mNumTextureUnits = num;
    00132             }
    00133
    00134             void setStencilBufferBitDepth(ushort num)
    00135             {
    00136                 mStencilBufferBitDepth = num;
    00137             }
    00138
    00139             void setNumVertexBlendMatrices(ushort num)
    00140             {
    00141                 mNumVertexBlendMatrices = num;
    00142             }
    00143
    00144             ushort getNumWorldMatricies(void) const
    00145             {
    00146                 return mNumWorldMatrices;
    00147             }
    00148
    00159             ushort getNumTextureUnits(void) const
    00160             {
    00161                 return mNumTextureUnits;
    00162             }
    00163
    00170             ushort getStencilBufferBitDepth(void) const
    00171             {
    00172                 return mStencilBufferBitDepth;
    00173             }
    00174
    00177             ushort numVertexBlendMatrices(void) const
    00178             {
    00179                 return mNumVertexBlendMatrices;
    00180             }
    00181
    00184             void setCapability(const Capabilities c)
    00185             {
    00186                 mCapabilities |= c;
    00187             }
    00188
    00191             bool hasCapability(const Capabilities c) const
    00192             {
    00193                 if(mCapabilities & c)
    00194                 {
    00195                     return true;
    00196                 }
    00197                 else
    00198                 {
    00199                     return false;
    00200                 }
    00201             }
    00203             const String& getMaxVertexProgramVersion(void) const
    00204             {
    00205                 return mMaxVertexProgramVersion;
    00206             }
    00208             const String& getMaxFragmentProgramVersion(void) const
    00209             {
    00210                 return mMaxFragmentProgramVersion;
    00211             }
    00213             ushort getVertexProgramConstantFloatCount(void) const
    00214             {
    00215                 return mVertexProgramConstantFloatCount;
    00216             }
    00218             ushort getVertexProgramConstantIntCount(void) const
    00219             {
    00220                 return mVertexProgramConstantIntCount;
    00221             }
    00223             ushort getVertexProgramConstantBoolCount(void) const
    00224             {
    00225                 return mVertexProgramConstantBoolCount;
    00226             }
    00228             ushort getFragmentProgramConstantFloatCount(void) const
    00229             {
    00230                 return mFragmentProgramConstantFloatCount;
    00231             }
    00233             ushort getFragmentProgramConstantIntCount(void) const
    00234             {
    00235                 return mFragmentProgramConstantIntCount;
    00236             }
    00238             ushort getFragmentProgramConstantBoolCount(void) const
    00239             {
    00240                 return mFragmentProgramConstantBoolCount;
    00241             }
    00242
    00243
    00244
    00246             void setMaxVertexProgramVersion(const String& ver)
    00247             {
    00248                 mMaxVertexProgramVersion = ver;
    00249             }
    00251             void setMaxFragmentProgramVersion(const String& ver)
    00252             {
    00253                 mMaxFragmentProgramVersion = ver;
    00254             }
    00256             void setVertexProgramConstantFloatCount(ushort c)
    00257             {
    00258                 mVertexProgramConstantFloatCount = c;
    00259             }
    00261             void setVertexProgramConstantIntCount(ushort c)
    00262             {
    00263                 mVertexProgramConstantIntCount = c;
    00264             }
    00266             void setVertexProgramConstantBoolCount(ushort c)
    00267             {
    00268                 mVertexProgramConstantBoolCount = c;
    00269             }
    00271             void setFragmentProgramConstantFloatCount(ushort c)
    00272             {
    00273                 mFragmentProgramConstantFloatCount = c;
    00274             }
    00276             void setFragmentProgramConstantIntCount(ushort c)
    00277             {
    00278                 mFragmentProgramConstantIntCount = c;
    00279             }
    00281             void setFragmentProgramConstantBoolCount(ushort c)
    00282             {
    00283                 mFragmentProgramConstantBoolCount = c;
    00284             }
    00285
    00287             void log(Log* pLog);
    00288
    00289
    00290
    00291
    00292     };
    00293 };
    00294
    00295 #endif // __RenderSystemCapabilities__
    00296

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:51 2006