/*****************************************************************************
 * $Id: eng_stats.hh,v 1.2 2006/11/02 05:26:06 devel Exp $
 * @file
 * @author	Jim E. Brooks  http://www.jimbrooks.org
 * @brief	Engine statistics.
 *//*
 * LEGAL:	COPYRIGHT (C) 2006 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE (GPL).
 *****************************************************************************/

#ifndef ENG_STATS
#define ENG_STATS 1

//------------------------------------------------------------------------------

#if ! STATS

#define ENGINE_STATS_CODE( CODE )

#else

// Statistics code macro.
#undef  ENGINE_STATS_CODE
#if STATS && COMPILING_ENGINE
#define ENGINE_STATS_CODE( CODE ) { CODE }
#else
#define ENGINE_STATS_CODE( CODE )
#endif

#define STATS_CODE ERROR_USE_SPECIFIC_STATS_CODE_MACRO

////////////////////////////////////////////////////////////////////////////////
/// @brief Statistics.
class EngineStats
{
public:
			EngineStats( void );
	void	PreDrawViews( void );

    // Reminder: Might need to update PreDrawViews() and operator<<() after adding new members.
	int		mPolygonAttribs;
	int		mCacheMissVertexs;
	int		mCacheMissNormals;
	int		mObjectGroupVisible;
	int		mObjectGroupInvisible;
    uint    mBillboards;
    uint    mBillboardSlicesDrawn;
	uint	mSortingDone;
	uint	mSortingSkip;
	uint	mObjectsDrawn;  // per frame
};

extern ostream* gStreamStats;

ostream& operator<<( ostream& strm, const EngineStats& o );

#endif // STATS

//------------------------------------------------------------------------------

#endif // ENG_STATS_HH
