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             pLog->logMessage(
00073                 "   - Two sided stencil support: " 
00074                 + StringConverter::toString(hasCapability(RSC_TWO_SIDED_STENCIL), true));
00075             pLog->logMessage(
00076                 "   - Wrap stencil values: " 
00077                 + StringConverter::toString(hasCapability(RSC_STENCIL_WRAP), true));
00078         }
00079         pLog->logMessage(
00080             " * Hardware vertex / index buffers: " 
00081             + StringConverter::toString(hasCapability(RSC_VBO), true));
00082         pLog->logMessage(
00083             " * Vertex programs: " 
00084             + StringConverter::toString(hasCapability(RSC_VERTEX_PROGRAM), true));
00085         if (hasCapability(RSC_VERTEX_PROGRAM))
00086         {
00087             pLog->logMessage(
00088                 "   - Max vertex program version: " 
00089                 + getMaxVertexProgramVersion());
00090         }
00091         pLog->logMessage(
00092             " * Fragment programs: " 
00093             + StringConverter::toString(hasCapability(RSC_FRAGMENT_PROGRAM), true));
00094         if (hasCapability(RSC_FRAGMENT_PROGRAM))
00095         {
00096             pLog->logMessage(
00097                 "   - Max fragment program version: " 
00098                 + getMaxFragmentProgramVersion());
00099         }
00100 
00101         pLog->logMessage(
00102             " * Texture Compression: " 
00103             + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION), true));
00104         if (hasCapability(RSC_TEXTURE_COMPRESSION))
00105         {
00106             pLog->logMessage(
00107                 "   - DXT: " 
00108                 + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_DXT), true));
00109             pLog->logMessage(
00110                 "   - VTC: " 
00111                 + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_VTC), true));
00112         }
00113 
00114         pLog->logMessage(
00115             " * Scissor Rectangle: " 
00116             + StringConverter::toString(hasCapability(RSC_SCISSOR_TEST), true));
00117         pLog->logMessage(
00118             " * Hardware Occlusion Query: " 
00119             + StringConverter::toString(hasCapability(RSC_HWOCCLUSION), true));
00120         pLog->logMessage(
00121             " * User clip planes: " 
00122             + StringConverter::toString(hasCapability(RSC_USER_CLIP_PLANES), true));
00123 
00124 
00125     }
00126 };

Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:22:40 2004