Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class 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 (c) 2000-2006 Torus Knot Software Ltd
    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 You may alternatively use this source under the terms of a specific version of
    00025 the OGRE Unrestricted License provided you have obtained such a license from
    00026 Torus Knot Software Ltd.
    00027 -----------------------------------------------------------------------------
    00028 */
    00029 #ifndef __RenderSystemCapabilities__
    00030 #define __RenderSystemCapabilities__ 1
    00031
    00032 // Precompiler options
    00033 #include "OgrePrerequisites.h"
    00034 #include "OgreString.h"
    00035
    00036 namespace Ogre {
    00037
    00039     enum Capabilities
    00040     {
    00041         //RSC_MULTITEXTURE          = 0x00000001,
    00043         RSC_AUTOMIPMAP              = 0x00000002,
    00044         RSC_BLENDING                = 0x00000004,
    00046         RSC_ANISOTROPY              = 0x00000008,
    00048         RSC_DOT3                    = 0x00000010,
    00050         RSC_CUBEMAPPING             = 0x00000020,
    00052         RSC_HWSTENCIL               = 0x00000040,
    00054         RSC_VBO                     = 0x00000080,
    00056         RSC_VERTEX_PROGRAM          = 0x00000200,
    00058         RSC_FRAGMENT_PROGRAM        = 0x00000400,
    00060         RSC_TEXTURE_COMPRESSION     = 0x00000800,
    00062         RSC_TEXTURE_COMPRESSION_DXT = 0x00001000,
    00064         RSC_TEXTURE_COMPRESSION_VTC = 0x00002000,
    00066         RSC_SCISSOR_TEST            = 0x00004000,
    00068         RSC_TWO_SIDED_STENCIL       = 0x00008000,
    00070         RSC_STENCIL_WRAP            = 0x00010000,
    00072         RSC_HWOCCLUSION             = 0x00020000,
    00074         RSC_USER_CLIP_PLANES        = 0x00040000,
    00076         RSC_VERTEX_FORMAT_UBYTE4    = 0x00080000,
    00078         RSC_INFINITE_FAR_PLANE      = 0x00100000,
    00080         RSC_HWRENDER_TO_TEXTURE     = 0x00200000,
    00082         RSC_TEXTURE_FLOAT           = 0x00400000,
    00084         RSC_NON_POWER_OF_2_TEXTURES = 0x00800000,
    00086         RSC_TEXTURE_3D              = 0x01000000,
    00088         RSC_POINT_SPRITES           = 0x02000000,
    00090         RSC_POINT_EXTENDED_PARAMETERS = 0x04000000,
    00092         RSC_VERTEX_TEXTURE_FETCH = 0x08000000,
    00094         RSC_MIPMAP_LOD_BIAS = 0x10000000
    00095
    00096     };
    00097
    00103     class _OgreExport RenderSystemCapabilities
    00104     {
    00105         private:
    00107             ushort mNumWorldMatrices;
    00109             ushort mNumTextureUnits;
    00111             ushort mStencilBufferBitDepth;
    00113             ushort mNumVertexBlendMatrices;
    00115             int mCapabilities;
    00117             String mMaxVertexProgramVersion;
    00119             String mMaxFragmentProgramVersion;
    00121             ushort mVertexProgramConstantFloatCount;
    00123             ushort mVertexProgramConstantIntCount;
    00125             ushort mVertexProgramConstantBoolCount;
    00127             ushort mFragmentProgramConstantFloatCount;
    00129             ushort mFragmentProgramConstantIntCount;
    00131             ushort mFragmentProgramConstantBoolCount;
    00133             ushort mNumMultiRenderTargets;
    00135             Real mMaxPointSize;
    00137             bool mNonPOW2TexturesLimited;
    00139             ushort mNumVertexTextureUnits;
    00141             bool mVertexTextureUnitsShared;
    00142
    00143         public:
    00144             RenderSystemCapabilities ();
    00145             ~RenderSystemCapabilities ();
    00146
    00147             void setNumWorldMatricies(ushort num)
    00148             {
    00149                 mNumWorldMatrices = num;
    00150             }
    00151
    00152             void setNumTextureUnits(ushort num)
    00153             {
    00154                 mNumTextureUnits = num;
    00155             }
    00156
    00157             void setStencilBufferBitDepth(ushort num)
    00158             {
    00159                 mStencilBufferBitDepth = num;
    00160             }
    00161
    00162             void setNumVertexBlendMatrices(ushort num)
    00163             {
    00164                 mNumVertexBlendMatrices = num;
    00165             }
    00166
    00168             void setNumMultiRenderTargets(ushort num)
    00169             {
    00170                 mNumMultiRenderTargets = num;
    00171             }
    00172
    00173             ushort getNumWorldMatricies(void) const
    00174             {
    00175                 return mNumWorldMatrices;
    00176             }
    00177
    00190             ushort getNumTextureUnits(void) const
    00191             {
    00192                 return mNumTextureUnits;
    00193             }
    00194
    00201             ushort getStencilBufferBitDepth(void) const
    00202             {
    00203                 return mStencilBufferBitDepth;
    00204             }
    00205
    00208             ushort numVertexBlendMatrices(void) const
    00209             {
    00210                 return mNumVertexBlendMatrices;
    00211             }
    00212
    00214             ushort numMultiRenderTargets(void) const
    00215             {
    00216                 return mNumMultiRenderTargets;
    00217             }
    00218
    00221             void setCapability(const Capabilities c)
    00222             {
    00223                 mCapabilities |= c;
    00224             }
    00225
    00228             bool hasCapability(const Capabilities c) const
    00229             {
    00230                 if(mCapabilities & c)
    00231                 {
    00232                     return true;
    00233                 }
    00234                 else
    00235                 {
    00236                     return false;
    00237                 }
    00238             }
    00240             const String& getMaxVertexProgramVersion(void) const
    00241             {
    00242                 return mMaxVertexProgramVersion;
    00243             }
    00245             const String& getMaxFragmentProgramVersion(void) const
    00246             {
    00247                 return mMaxFragmentProgramVersion;
    00248             }
    00250             ushort getVertexProgramConstantFloatCount(void) const
    00251             {
    00252                 return mVertexProgramConstantFloatCount;
    00253             }
    00255             ushort getVertexProgramConstantIntCount(void) const
    00256             {
    00257                 return mVertexProgramConstantIntCount;
    00258             }
    00260             ushort getVertexProgramConstantBoolCount(void) const
    00261             {
    00262                 return mVertexProgramConstantBoolCount;
    00263             }
    00265             ushort getFragmentProgramConstantFloatCount(void) const
    00266             {
    00267                 return mFragmentProgramConstantFloatCount;
    00268             }
    00270             ushort getFragmentProgramConstantIntCount(void) const
    00271             {
    00272                 return mFragmentProgramConstantIntCount;
    00273             }
    00275             ushort getFragmentProgramConstantBoolCount(void) const
    00276             {
    00277                 return mFragmentProgramConstantBoolCount;
    00278             }
    00279
    00280
    00281
    00283             void setMaxVertexProgramVersion(const String& ver)
    00284             {
    00285                 mMaxVertexProgramVersion = ver;
    00286             }
    00288             void setMaxFragmentProgramVersion(const String& ver)
    00289             {
    00290                 mMaxFragmentProgramVersion = ver;
    00291             }
    00293             void setVertexProgramConstantFloatCount(ushort c)
    00294             {
    00295                 mVertexProgramConstantFloatCount = c;
    00296             }
    00298             void setVertexProgramConstantIntCount(ushort c)
    00299             {
    00300                 mVertexProgramConstantIntCount = c;
    00301             }
    00303             void setVertexProgramConstantBoolCount(ushort c)
    00304             {
    00305                 mVertexProgramConstantBoolCount = c;
    00306             }
    00308             void setFragmentProgramConstantFloatCount(ushort c)
    00309             {
    00310                 mFragmentProgramConstantFloatCount = c;
    00311             }
    00313             void setFragmentProgramConstantIntCount(ushort c)
    00314             {
    00315                 mFragmentProgramConstantIntCount = c;
    00316             }
    00318             void setFragmentProgramConstantBoolCount(ushort c)
    00319             {
    00320                 mFragmentProgramConstantBoolCount = c;
    00321             }
    00323             void setMaxPointSize(Real s)
    00324             {
    00325                 mMaxPointSize = s;
    00326             }
    00328             Real getMaxPointSize(void) const
    00329             {
    00330                 return mMaxPointSize;
    00331             }
    00333             void setNonPOW2TexturesLimited(bool l)
    00334             {
    00335                 mNonPOW2TexturesLimited = l;
    00336             }
    00345             bool getNonPOW2TexturesLimited(void) const
    00346             {
    00347                 return mNonPOW2TexturesLimited;
    00348             }
    00349
    00351             void setNumVertexTextureUnits(ushort n)
    00352             {
    00353                 mNumVertexTextureUnits = n;
    00354             }
    00356             ushort getNumVertexTextureUnits(void) const
    00357             {
    00358                 return mNumVertexTextureUnits;
    00359             }
    00361             void setVertexTextureUnitsShared(bool shared)
    00362             {
    00363                 mVertexTextureUnitsShared = shared;
    00364             }
    00366             bool getVertexTextureUnitsShared(void) const
    00367             {
    00368                 return mVertexTextureUnitsShared;
    00369             }
    00370
    00371
    00373             void log(Log* pLog);
    00374
    00375
    00376
    00377
    00378     };
    00379 }
    00380
    00381 #endif // __RenderSystemCapabilities__
    00382

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:46:26 2008