nux-1.14.0
|
00001 /* 00002 * Copyright 2010 Inalogic® Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License, as 00006 * published by the Free Software Foundation; either version 2.1 or 3.0 00007 * of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranties of 00011 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the applicable version of the GNU Lesser General Public 00013 * License for more details. 00014 * 00015 * You should have received a copy of both the GNU Lesser General Public 00016 * License along with this program. If not, see <http://www.gnu.org/licenses/> 00017 * 00018 * Authored by: Jay Taoko <jaytaoko@inalogic.com> 00019 * 00020 */ 00021 00022 00023 #ifndef RUNTIMESTATS_H 00024 #define RUNTIMESTATS_H 00025 00026 namespace nux 00027 { 00028 00029 class RenderingStats 00030 { 00031 NUX_DECLARE_GLOBAL_OBJECT (RenderingStats, NuxGraphicsGlobalSingletonInitializer); 00032 public: 00033 static t_u32 m_NumTex2D; 00034 static t_u32 m_GPUSizeTex2D; 00035 static t_u32 m_NumTexRectangle; 00036 static t_u32 m_GPUSizeTexRectangle; 00037 static t_u32 m_NumTexCube; 00038 static t_u32 m_GPUSizeTexCube; 00039 static t_u32 m_NumTexVolume; 00040 static t_u32 m_GPUSizeTexVolume; 00041 static t_u32 m_NumTexAnimated; 00042 static t_u32 m_GPUSizeTexAnimated; 00043 00044 static t_u32 m_NumPBO; 00045 static t_u32 m_GPUSizePBO; 00046 00047 static t_u32 m_NumFrameBufferObject; 00048 00049 static t_u32 m_NumQueryObject; 00050 00051 static t_u32 m_NumVertexBuffer; 00052 static t_u32 m_GPUSizeVertexBuffer; 00053 00054 static t_u32 m_NumIndexBuffer; 00055 static t_u32 m_GPUSizeIndexBuffer; 00056 00057 static t_u32 m_NumVertexShader; 00058 static t_u32 m_NumPixelShader; 00059 static t_u32 m_NumShaderProgram; 00060 00061 static t_u32 m_TotalGPUSize; 00062 void Register (IOpenGLResource *GraphicsObject); 00063 void UnRegister (IOpenGLResource *GraphicsObject); 00064 00065 std::vector<int> _texture_2d_array; 00066 std::vector<int> _texture_rect_array; 00067 }; 00068 00069 } 00070 00071 #define GRunTimeStats NUX_GLOBAL_OBJECT_INSTANCE(nux::RenderingStats) 00072 00073 #endif // RUNTIMESTATS_H