1 | /*
|
---|
2 | -----------------------------------------------------------------------------
|
---|
3 | This source file is part of OGRE
|
---|
4 | (Object-oriented Graphics Rendering Engine)
|
---|
5 | For the latest info, see http://www.ogre3d.org/
|
---|
6 |
|
---|
7 | Copyright (c) 2000-2005 The OGRE Team
|
---|
8 | Also see acknowledgements in Readme.html
|
---|
9 |
|
---|
10 | This program is free software; you can redistribute it and/or modify it under
|
---|
11 | the terms of the GNU Lesser General Public License as published by the Free Software
|
---|
12 | Foundation; either version 2 of the License, or (at your option) any later
|
---|
13 | version.
|
---|
14 |
|
---|
15 | This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU Lesser General Public License along with
|
---|
20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
---|
21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
---|
22 | http://www.gnu.org/copyleft/lesser.txt.
|
---|
23 | -----------------------------------------------------------------------------
|
---|
24 | */
|
---|
25 | #include "OgreStableHeaders.h"
|
---|
26 |
|
---|
27 | #include "OgreRenderSystemCapabilities.h"
|
---|
28 | #include "OgreLogManager.h"
|
---|
29 | #include "OgreStringConverter.h"
|
---|
30 | #include "OgreException.h"
|
---|
31 |
|
---|
32 | namespace Ogre {
|
---|
33 |
|
---|
34 | //-----------------------------------------------------------------------
|
---|
35 | RenderSystemCapabilities::RenderSystemCapabilities()
|
---|
36 | : mNumWorldMatrices(0), mNumTextureUnits(0), mStencilBufferBitDepth(0),
|
---|
37 | mNumVertexBlendMatrices(0), mCapabilities(0), mNumMultiRenderTargets(1)
|
---|
38 | {
|
---|
39 | }
|
---|
40 | //-----------------------------------------------------------------------
|
---|
41 | RenderSystemCapabilities::~RenderSystemCapabilities()
|
---|
42 | {
|
---|
43 | }
|
---|
44 | //-----------------------------------------------------------------------
|
---|
45 | void RenderSystemCapabilities::log(Log* pLog)
|
---|
46 | {
|
---|
47 | pLog->logMessage("RenderSystem capabilities");
|
---|
48 | pLog->logMessage("-------------------------");
|
---|
49 | pLog->logMessage(
|
---|
50 | " * Hardware generation of mipmaps: "
|
---|
51 | + StringConverter::toString(hasCapability(RSC_AUTOMIPMAP), true));
|
---|
52 | pLog->logMessage(
|
---|
53 | " * Texture blending: "
|
---|
54 | + StringConverter::toString(hasCapability(RSC_BLENDING), true));
|
---|
55 | pLog->logMessage(
|
---|
56 | " * Anisotropic texture filtering: "
|
---|
57 | + StringConverter::toString(hasCapability(RSC_ANISOTROPY), true));
|
---|
58 | pLog->logMessage(
|
---|
59 | " * Dot product texture operation: "
|
---|
60 | + StringConverter::toString(hasCapability(RSC_DOT3), true));
|
---|
61 | pLog->logMessage(
|
---|
62 | " * Cube mapping: "
|
---|
63 | + StringConverter::toString(hasCapability(RSC_CUBEMAPPING), true));
|
---|
64 | pLog->logMessage(
|
---|
65 | " * Hardware stencil buffer: "
|
---|
66 | + StringConverter::toString(hasCapability(RSC_HWSTENCIL), true));
|
---|
67 | if (hasCapability(RSC_HWSTENCIL))
|
---|
68 | {
|
---|
69 | pLog->logMessage(
|
---|
70 | " - Stencil depth: "
|
---|
71 | + StringConverter::toString(getStencilBufferBitDepth()));
|
---|
72 | pLog->logMessage(
|
---|
73 | " - Two sided stencil support: "
|
---|
74 | + StringConverter::toString(hasCapability(RSC_TWO_SIDED_STENCIL), true));
|
---|
75 | pLog->logMessage(
|
---|
76 | " - Wrap stencil values: "
|
---|
77 | + StringConverter::toString(hasCapability(RSC_STENCIL_WRAP), true));
|
---|
78 | }
|
---|
79 | pLog->logMessage(
|
---|
80 | " * Hardware vertex / index buffers: "
|
---|
81 | + StringConverter::toString(hasCapability(RSC_VBO), true));
|
---|
82 | pLog->logMessage(
|
---|
83 | " * Vertex programs: "
|
---|
84 | + StringConverter::toString(hasCapability(RSC_VERTEX_PROGRAM), true));
|
---|
85 | if (hasCapability(RSC_VERTEX_PROGRAM))
|
---|
86 | {
|
---|
87 | pLog->logMessage(
|
---|
88 | " - Max vertex program version: "
|
---|
89 | + getMaxVertexProgramVersion());
|
---|
90 | }
|
---|
91 | pLog->logMessage(
|
---|
92 | " * Fragment programs: "
|
---|
93 | + StringConverter::toString(hasCapability(RSC_FRAGMENT_PROGRAM), true));
|
---|
94 | if (hasCapability(RSC_FRAGMENT_PROGRAM))
|
---|
95 | {
|
---|
96 | pLog->logMessage(
|
---|
97 | " - Max fragment program version: "
|
---|
98 | + getMaxFragmentProgramVersion());
|
---|
99 | }
|
---|
100 |
|
---|
101 | pLog->logMessage(
|
---|
102 | " * Texture Compression: "
|
---|
103 | + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION), true));
|
---|
104 | if (hasCapability(RSC_TEXTURE_COMPRESSION))
|
---|
105 | {
|
---|
106 | pLog->logMessage(
|
---|
107 | " - DXT: "
|
---|
108 | + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_DXT), true));
|
---|
109 | pLog->logMessage(
|
---|
110 | " - VTC: "
|
---|
111 | + StringConverter::toString(hasCapability(RSC_TEXTURE_COMPRESSION_VTC), true));
|
---|
112 | }
|
---|
113 |
|
---|
114 | pLog->logMessage(
|
---|
115 | " * Scissor Rectangle: "
|
---|
116 | + StringConverter::toString(hasCapability(RSC_SCISSOR_TEST), true));
|
---|
117 | pLog->logMessage(
|
---|
118 | " * Hardware Occlusion Query: "
|
---|
119 | + StringConverter::toString(hasCapability(RSC_HWOCCLUSION), true));
|
---|
120 | pLog->logMessage(
|
---|
121 | " * User clip planes: "
|
---|
122 | + StringConverter::toString(hasCapability(RSC_USER_CLIP_PLANES), true));
|
---|
123 | pLog->logMessage(
|
---|
124 | " * VET_UBYTE4 vertex element type: "
|
---|
125 | + StringConverter::toString(hasCapability(RSC_VERTEX_FORMAT_UBYTE4), true));
|
---|
126 | pLog->logMessage(
|
---|
127 | " * Infinite far plane projection: "
|
---|
128 | + StringConverter::toString(hasCapability(RSC_INFINITE_FAR_PLANE), true));
|
---|
129 | pLog->logMessage(
|
---|
130 | " * Hardware render-to-texture: "
|
---|
131 | + StringConverter::toString(hasCapability(RSC_HWRENDER_TO_TEXTURE), true));
|
---|
132 | pLog->logMessage(
|
---|
133 | " * Floating point textures: "
|
---|
134 | + StringConverter::toString(hasCapability(RSC_TEXTURE_FLOAT), true));
|
---|
135 | pLog->logMessage(
|
---|
136 | " * Non-power-of-two textures: "
|
---|
137 | + StringConverter::toString(hasCapability(RSC_NON_POWER_OF_2_TEXTURES), true));
|
---|
138 | pLog->logMessage(
|
---|
139 | " * Volume textures: "
|
---|
140 | + StringConverter::toString(hasCapability(RSC_TEXTURE_3D), true));
|
---|
141 | pLog->logMessage(
|
---|
142 | " * Multiple Render Targets: "
|
---|
143 | + StringConverter::toString(mNumMultiRenderTargets));
|
---|
144 | pLog->logMessage(
|
---|
145 | " * Max Point Size: "
|
---|
146 | + StringConverter::toString(mMaxPointSize));
|
---|
147 |
|
---|
148 | }
|
---|
149 | };
|
---|