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

OgreRenderSystemCapabilities.cpp

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 #include "OgreStableHeaders.h"
00026 
00027 #include "OgreRenderSystemCapabilities.h"
00028 #include "OgreLogManager.h"
00029 #include "OgreStringConverter.h"
00030 #include "OgreException.h"
00031 
00032 namespace Ogre {
00033 
00034     //-----------------------------------------------------------------------
00035     RenderSystemCapabilities::RenderSystemCapabilities() 
00036       : mNumWorldMatrices(0), mNumTextureUnits(0), mStencilBufferBitDepth(0),
00037         mNumVertexBlendMatrices(0), mCapabilities(0)
00038     {
00039     }
00040     //-----------------------------------------------------------------------
00041     RenderSystemCapabilities::~RenderSystemCapabilities()
00042     {
00043     }
00044     //-----------------------------------------------------------------------
00045     void RenderSystemCapabilities::log(Log* pLog)
00046     {
00047         pLog->logMessage("RenderSystem capabilities");
00048         pLog->logMessage("-------------------------");
00049         pLog->logMessage(
00050             " * Hardware generation of mipmaps: " 
00051             + StringConverter::toString(hasCapability(RSC_AUTOMIPMAP), true));
00052         pLog->logMessage(
00053             " * Texture blending: " 
00054             + StringConverter::toString(hasCapability(RSC_BLENDING), true));
00055         pLog->logMessage(
00056             " * Anisotropic texture filtering: " 
00057             + StringConverter::toString(hasCapability(RSC_ANISOTROPY), true));
00058         pLog->logMessage(
00059             " * Dot product texture operation: " 
00060             + StringConverter::toString(hasCapability(RSC_DOT3), true));
00061         pLog->logMessage(
00062             " * Cube mapping: " 
00063             + StringConverter::toString(hasCapability(RSC_CUBEMAPPING), true));
00064         pLog->logMessage(
00065             " * Hardware stencil buffer: " 
00066             + StringConverter::toString(hasCapability(RSC_HWSTENCIL), true));
00067         if (hasCapability(RSC_HWSTENCIL))
00068         {
00069             pLog->logMessage(
00070                 "   - Stencil depth: " 
00071                 + StringConverter::toString(getStencilBufferBitDepth()));
00072         }
00073         pLog->logMessage(
00074             " * Hardware vertex / index buffers: " 
00075             + StringConverter::toString(hasCapability(RSC_VBO), true));
00076         pLog->logMessage(
00077             " * Vertex programs: " 
00078             + StringConverter::toString(hasCapability(RSC_VERTEX_PROGRAM), true));
00079         if (hasCapability(RSC_VERTEX_PROGRAM))
00080         {
00081             pLog->logMessage(
00082                 "   - Max vertex program version: " 
00083                 + getMaxVertexProgramVersion());
00084         }
00085         pLog->logMessage(
00086             " * Fragment programs: " 
00087             + StringConverter::toString(hasCapability(RSC_FRAGMENT_PROGRAM), true));
00088         if (hasCapability(RSC_FRAGMENT_PROGRAM))
00089         {
00090             pLog->logMessage(
00091                 "   - Max fragment program version: " 
00092                 + getMaxFragmentProgramVersion());
00093         }
00094 
00095         pLog->logMessage(
00096             " * Texture Compression: " 
00097             + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION), true));
00098         if (hasCapability(RSC_TEXTURE_COMPRESSION))
00099         {
00100             pLog->logMessage(
00101                 "   - DXT: " 
00102                 + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_DXT), true));
00103             pLog->logMessage(
00104                 "   - VTC: " 
00105                 + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_VTC), true));
00106         }
00107 
00108     }
00109 };

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