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, 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 00075 00076 }; 00077 00083 class _OgreExport RenderSystemCapabilities 00084 { 00085 private: 00087 ushort mNumWorldMatrices; 00089 ushort mNumTextureUnits; 00091 ushort mStencilBufferBitDepth; 00093 ushort mNumVertexBlendMatrices; 00095 int mCapabilities; 00097 String mMaxVertexProgramVersion; 00099 String mMaxFragmentProgramVersion; 00101 ushort mVertexProgramConstantFloatCount; 00103 ushort mVertexProgramConstantIntCount; 00105 ushort mVertexProgramConstantBoolCount; 00107 ushort mFragmentProgramConstantFloatCount; 00109 ushort mFragmentProgramConstantIntCount; 00111 ushort mFragmentProgramConstantBoolCount; 00112 00113 public: 00114 RenderSystemCapabilities (); 00115 ~RenderSystemCapabilities (); 00116 00117 void setNumWorldMatricies(ushort num) 00118 { 00119 mNumWorldMatrices = num; 00120 } 00121 00122 void setNumTextureUnits(ushort num) 00123 { 00124 mNumTextureUnits = num; 00125 } 00126 00127 void setStencilBufferBitDepth(ushort num) 00128 { 00129 mStencilBufferBitDepth = num; 00130 } 00131 00132 void setNumVertexBlendMatrices(ushort num) 00133 { 00134 mNumVertexBlendMatrices = num; 00135 } 00136 00137 ushort getNumWorldMatricies(void) const 00138 { 00139 return mNumWorldMatrices; 00140 } 00141 00152 ushort getNumTextureUnits(void) const 00153 { 00154 return mNumTextureUnits; 00155 } 00156 00163 ushort getStencilBufferBitDepth(void) const 00164 { 00165 return mStencilBufferBitDepth; 00166 } 00167 00170 ushort numVertexBlendMatrices(void) const 00171 { 00172 return mNumVertexBlendMatrices; 00173 } 00174 00177 void setCapability(const Capabilities c) 00178 { 00179 mCapabilities |= c; 00180 } 00181 00184 bool hasCapability(const Capabilities c) const 00185 { 00186 if(mCapabilities & c) 00187 { 00188 return true; 00189 } 00190 else 00191 { 00192 return false; 00193 } 00194 } 00196 const String& getMaxVertexProgramVersion(void) const 00197 { 00198 return mMaxVertexProgramVersion; 00199 } 00201 const String& getMaxFragmentProgramVersion(void) const 00202 { 00203 return mMaxFragmentProgramVersion; 00204 } 00206 ushort getVertexProgramConstantFloatCount(void) const 00207 { 00208 return mVertexProgramConstantFloatCount; 00209 } 00211 ushort getVertexProgramConstantIntCount(void) const 00212 { 00213 return mVertexProgramConstantIntCount; 00214 } 00216 ushort getVertexProgramConstantBoolCount(void) const 00217 { 00218 return mVertexProgramConstantBoolCount; 00219 } 00221 ushort getFragmentProgramConstantFloatCount(void) const 00222 { 00223 return mFragmentProgramConstantFloatCount; 00224 } 00226 ushort getFragmentProgramConstantIntCount(void) const 00227 { 00228 return mFragmentProgramConstantIntCount; 00229 } 00231 ushort getFragmentProgramConstantBoolCount(void) const 00232 { 00233 return mFragmentProgramConstantBoolCount; 00234 } 00235 00236 00237 00239 void setMaxVertexProgramVersion(const String& ver) 00240 { 00241 mMaxVertexProgramVersion = ver; 00242 } 00244 void setMaxFragmentProgramVersion(const String& ver) 00245 { 00246 mMaxFragmentProgramVersion = ver; 00247 } 00249 void setVertexProgramConstantFloatCount(ushort c) 00250 { 00251 mVertexProgramConstantFloatCount = c; 00252 } 00254 void setVertexProgramConstantIntCount(ushort c) 00255 { 00256 mVertexProgramConstantIntCount = c; 00257 } 00259 void setVertexProgramConstantBoolCount(ushort c) 00260 { 00261 mVertexProgramConstantBoolCount = c; 00262 } 00264 void setFragmentProgramConstantFloatCount(ushort c) 00265 { 00266 mFragmentProgramConstantFloatCount = c; 00267 } 00269 void setFragmentProgramConstantIntCount(ushort c) 00270 { 00271 mFragmentProgramConstantIntCount = c; 00272 } 00274 void setFragmentProgramConstantBoolCount(ushort c) 00275 { 00276 mFragmentProgramConstantBoolCount = c; 00277 } 00278 00280 void log(Log* pLog); 00281 00282 00283 00284 00285 }; 00286 }; 00287 00288 #endif // __RenderSystemCapabilities__ 00289
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:42 2004