/*
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Name : GliBench.h Author : vincent lhullier Date :12/10/98 Description : Bench Data
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */

#ifndef __GLIBENCH_H__

#define __GLIBENCH_H__

/* BENCH ACTIVE */
#ifdef GLI_BENCH

/*
 ---------------------------------------------------------------------------------------------------
    Structure
 ---------------------------------------------------------------------------------------------------
 */
typedef struct  tdstGliBench_
{
    long    lNumberOfElementsSended;
    long    lNumberOfObjectsSended;
    long    lNumberOfPolygonsSended;
    long    lNumberOfLinesSended;
    long    lNumberOfPolygonsBackfaces;
    long    lNumberOfPolygonsZculled;
    long    lNumberOfPolygonsZClipped;
    long    lNumberOfPolygonsXYCulled;
    long    lNumberOfPolygonsXYClipped;
    long    lNumberOfPolygonsXYUnClipped;
    long    lRateInPolygons;
    long    lRateInPixels;
    long    lPolycounter;
    long    lPolyTransparentcounter;
    long    lPolyOpaquecounter;

    /* Light */
    long    lNumberOfHotSpotLightedVertices;
    long    lNumberOfSpecularLightedVertices;
    long    lNumberOfParallelLightedVertices;

    /* triangle surface */
    long    lTrianglePerSurface[ 1024 ];

} tdstGliBench;

/*
 ===================================================================================================
    Macros to be used by mùain appli (not by DLL)
 ===================================================================================================
 */
#define GLI_M_vBenchInc(a)      GLI_g_stBench.##a++;
#define GLI_M_vBenchAdd(a, b)   GLI_g_stBench.##a += b;
#define GLI_M_vBenchReset()     memset(&GLI_g_stBench, 0, sizeof(tdstGliBench));

/*
 ===================================================================================================
    Macros to be used by DLL
 ===================================================================================================
 */
#define GLI_MDRV_M_vBenchInc(a)     GLI_MDRV_g_p_stBench->##a++;
#define GLI_MDRV_M_vBenchAdd(a, b)  GLI_MDRV_g_p_stBench->##a += b;

/* Globals */
extern tdstGliBench GLI_g_stBench;
extern tdstGliBench *GLI_MDRV_g_p_stBench;

/* BENCH NOT ACTIVE */
#else   /* GLI_BENCH */

#define GLI_M_vBenchInc(a)
#define GLI_M_vBenchAdd(a, b)
#define GLI_M_vBenchReset()

#define GLI_MDRV_M_vBenchInc(a)
#define GLI_MDRV_M_vBenchAdd(a, b)
#endif
#endif /* __GLIBENCH_H */
