Back to index

nux  3.0.0
RunTimeStats.h
Go to the documentation of this file.
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 unsigned int m_NumTex2D;
00034     static unsigned int m_GPUSizeTex2D;
00035     static unsigned int m_NumTexRectangle;
00036     static unsigned int m_GPUSizeTexRectangle;
00037     static unsigned int m_NumTexCube;
00038     static unsigned int m_GPUSizeTexCube;
00039     static unsigned int m_NumTexVolume;
00040     static unsigned int m_GPUSizeTexVolume;
00041     static unsigned int m_NumTexAnimated;
00042     static unsigned int m_GPUSizeTexAnimated;
00043 
00044     static unsigned int m_NumPBO;
00045     static unsigned int m_GPUSizePBO;
00046 
00047     static unsigned int m_NumFrameBufferObject;
00048 
00049     static unsigned int m_NumQueryObject;
00050 
00051     static unsigned int m_NumVertexBuffer;
00052     static unsigned int m_GPUSizeVertexBuffer;
00053 
00054     static unsigned int m_NumIndexBuffer;
00055     static unsigned int m_GPUSizeIndexBuffer;
00056 
00057     static unsigned int m_NumVertexShader;
00058     static unsigned int m_NumPixelShader;
00059     static unsigned int m_NumShaderProgram;
00060 
00061     static unsigned int 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