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; 00120 ushort mNumMultiRenderTargets; 00122 Real mMaxPointSize; 00123 00124 public: 00125 RenderSystemCapabilities (); 00126 ~RenderSystemCapabilities (); 00127 00128 void setNumWorldMatricies(ushort num) 00129 { 00130 mNumWorldMatrices = num; 00131 } 00132 00133 void setNumTextureUnits(ushort num) 00134 { 00135 mNumTextureUnits = num; 00136 } 00137 00138 void setStencilBufferBitDepth(ushort num) 00139 { 00140 mStencilBufferBitDepth = num; 00141 } 00142 00143 void setNumVertexBlendMatrices(ushort num) 00144 { 00145 mNumVertexBlendMatrices = num; 00146 } 00147 00149 void setNumMultiRenderTargets(ushort num) 00150 { 00151 mNumMultiRenderTargets = num; 00152 } 00153 00154 ushort getNumWorldMatricies(void) const 00155 { 00156 return mNumWorldMatrices; 00157 } 00158 00169 ushort getNumTextureUnits(void) const 00170 { 00171 return mNumTextureUnits; 00172 } 00173 00180 ushort getStencilBufferBitDepth(void) const 00181 { 00182 return mStencilBufferBitDepth; 00183 } 00184 00187 ushort numVertexBlendMatrices(void) const 00188 { 00189 return mNumVertexBlendMatrices; 00190 } 00191 00193 ushort numMultiRenderTargets(void) const 00194 { 00195 return mNumMultiRenderTargets; 00196 } 00197 00200 void setCapability(const Capabilities c) 00201 { 00202 mCapabilities |= c; 00203 } 00204 00207 bool hasCapability(const Capabilities c) const 00208 { 00209 if(mCapabilities & c) 00210 { 00211 return true; 00212 } 00213 else 00214 { 00215 return false; 00216 } 00217 } 00219 const String& getMaxVertexProgramVersion(void) const 00220 { 00221 return mMaxVertexProgramVersion; 00222 } 00224 const String& getMaxFragmentProgramVersion(void) const 00225 { 00226 return mMaxFragmentProgramVersion; 00227 } 00229 ushort getVertexProgramConstantFloatCount(void) const 00230 { 00231 return mVertexProgramConstantFloatCount; 00232 } 00234 ushort getVertexProgramConstantIntCount(void) const 00235 { 00236 return mVertexProgramConstantIntCount; 00237 } 00239 ushort getVertexProgramConstantBoolCount(void) const 00240 { 00241 return mVertexProgramConstantBoolCount; 00242 } 00244 ushort getFragmentProgramConstantFloatCount(void) const 00245 { 00246 return mFragmentProgramConstantFloatCount; 00247 } 00249 ushort getFragmentProgramConstantIntCount(void) const 00250 { 00251 return mFragmentProgramConstantIntCount; 00252 } 00254 ushort getFragmentProgramConstantBoolCount(void) const 00255 { 00256 return mFragmentProgramConstantBoolCount; 00257 } 00258 00259 00260 00262 void setMaxVertexProgramVersion(const String& ver) 00263 { 00264 mMaxVertexProgramVersion = ver; 00265 } 00267 void setMaxFragmentProgramVersion(const String& ver) 00268 { 00269 mMaxFragmentProgramVersion = ver; 00270 } 00272 void setVertexProgramConstantFloatCount(ushort c) 00273 { 00274 mVertexProgramConstantFloatCount = c; 00275 } 00277 void setVertexProgramConstantIntCount(ushort c) 00278 { 00279 mVertexProgramConstantIntCount = c; 00280 } 00282 void setVertexProgramConstantBoolCount(ushort c) 00283 { 00284 mVertexProgramConstantBoolCount = c; 00285 } 00287 void setFragmentProgramConstantFloatCount(ushort c) 00288 { 00289 mFragmentProgramConstantFloatCount = c; 00290 } 00292 void setFragmentProgramConstantIntCount(ushort c) 00293 { 00294 mFragmentProgramConstantIntCount = c; 00295 } 00297 void setFragmentProgramConstantBoolCount(ushort c) 00298 { 00299 mFragmentProgramConstantBoolCount = c; 00300 } 00302 void setMaxPointSize(Real s) 00303 { 00304 mMaxPointSize = s; 00305 } 00307 Real getMaxPointSize(void) const 00308 { 00309 return mMaxPointSize; 00310 } 00311 00312 00314 void log(Log* pLog); 00315 00316 00317 00318 00319 }; 00320 }; 00321 00322 #endif // __RenderSystemCapabilities__ 00323
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:37:48 2006