00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "KeosRenderSystemCapabilities.h"
00022 #include "KeosLogger.h"
00023 #include "KeosException.h"
00024 #include "KeosString.h"
00025
00026 namespace Keos
00027 {
00028
00029
00030
00031
00032
00033
00034 CRenderSystemCapabilities::CRenderSystemCapabilities()
00035 : m_nNumTextureUnits(0), m_nCapabilities(0)
00036 {}
00037
00038
00039 CRenderSystemCapabilities::~CRenderSystemCapabilities()
00040 {}
00041
00042
00043 void CRenderSystemCapabilities::Log()
00044 {
00045 ILogger::Log("RenderSystem capabilities :");
00046 ILogger::Log("---------------------------");
00047
00048 ILogger::Log("* Texture units : %d", GetNumTextureUnits());
00049 ILogger::Log("* Hardware generation of mipmaps : %s",
00050 CStringConverter::ToString(HasCapability(CAP_HW_MIPMAPPING), true).c_str());
00051 ILogger::Log("* DXT Texture Compression : %s",
00052 CStringConverter::ToString(HasCapability(CAP_TEXTURE_COMPRESSION_DXT), true).c_str());
00053 ILogger::Log("* Non-power-of-two textures : %s",
00054 CStringConverter::ToString(HasCapability(CAP_NON_POWER_OF_2_TEXTURES), true).c_str());
00055
00056 if (HasCapability(CAP_VERTEX_PROGRAM))
00057 ILogger::Log("* Vertex programs (vertex shaders) : %s",
00058 GetMaxVertexProgramVersion().c_str());
00059 else ILogger::Log("* Vertex programs (vertex shaders) : no");
00060 if (HasCapability(CAP_FRAGMENT_PROGRAM))
00061 ILogger::Log("* Fragment programs (pixel shaders): %s",
00062 GetMaxFragmentProgramVersion().c_str());
00063 else ILogger::Log("* Fragment programs (pixel shaders): no");
00064 }
00065
00066 }
00067