mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-12-26 23:54:50 +01:00
63 lines
3.1 KiB
C++
63 lines
3.1 KiB
C++
/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */
|
|
|
|
#include "stdh.h"
|
|
|
|
#include <Engine/Graphics/GfxProfile.h>
|
|
|
|
// profile form for profiling gfx
|
|
CGfxProfile gpGfxProfile;
|
|
CProfileForm &_pfGfxProfile = gpGfxProfile;
|
|
|
|
CGfxProfile::CGfxProfile(void)
|
|
: CProfileForm ("Gfx", "frames",
|
|
CGfxProfile::PCI_COUNT, CGfxProfile::PTI_COUNT)
|
|
{
|
|
// initialize timers
|
|
SETTIMERNAME(PTI_LOCKDRAWPORT, "LockDrawPort()", "");
|
|
SETTIMERNAME(PTI_SWAPBUFFERS, "SwapBuffers()", "");
|
|
SETTIMERNAME(PTI_PUTTEXTURE, "PutTexture()", "");
|
|
SETTIMERNAME(PTI_PUTTEXT, "PutText()", "");
|
|
SETTIMERNAME(PTI_CACHESHADOW, "CacheShadow", "");
|
|
SETTIMERNAME(PTI_SETCURRENTTEXTURE, "SetCurrentTexture", "setting");
|
|
SETTIMERNAME(PTI_TEXTUREPARAMS, " TextureParams", "");
|
|
SETTIMERNAME(PTI_TEXTUREUPLOADING, " TextureUploading", "");
|
|
SETTIMERNAME(PTI_MAKEMIPMAPS, "MakeMipmaps()", "");
|
|
SETTIMERNAME(PTI_DITHERBITMAP, "DitherBitmap()", "");
|
|
SETTIMERNAME(PTI_FILTERBITMAP, "FilterBitmap()", "");
|
|
|
|
SETTIMERNAME(PTI_RENDERSCENE, "RenderScene", "");
|
|
SETTIMERNAME(PTI_RENDERSCENE_BCG, "rs_RenderScene_bcg", "");
|
|
SETTIMERNAME(PTI_RENDERSCENE_ZONLY, "rs_RenderScene_zonly", "");
|
|
SETTIMERNAME(PTI_RS_LOCKARRAYS, "rs_LockArrays", "");
|
|
SETTIMERNAME(PTI_RS_DRAWELEMENTS, "rs_DrawElements", "");
|
|
SETTIMERNAME(PTI_RS_REMOVEDUMMY, "rs_RemoveDummy", "");
|
|
SETTIMERNAME(PTI_RS_CHECKLAYERSUPTODATE, "rs_CheckLayers", "");
|
|
SETTIMERNAME(PTI_RS_BINTOGROUPS, "rs_BinToGroups", "");
|
|
SETTIMERNAME(PTI_RS_MAKEMIPFACTOR, " rs_MakeMipAdjustMap", "");
|
|
SETTIMERNAME(PTI_RS_MAKEVERTEXCOORDS, "rs_MakeVertexCoords", "");
|
|
SETTIMERNAME(PTI_RS_SETCOLORS, "rs_SetColors", "");
|
|
SETTIMERNAME(PTI_RS_SETTEXCOORDS, "rs_SetTexcoords", "");
|
|
SETTIMERNAME(PTI_RS_RENDERGROUP, "rs_RenderGroup", "");
|
|
SETTIMERNAME(PTI_RS_RENDERGROUPINTERNAL, " rs_RenderGroupInternal", "");
|
|
SETTIMERNAME(PTI_RS_BINBYMULTITEXTURING, " rs_BinByMultiTexturing", "");
|
|
SETTIMERNAME(PTI_RS_RENDERSHADOWS, "rs_RenderShadows", "");
|
|
SETTIMERNAME(PTI_RS_RENDERTEXTURES, "rs_RenderTextures", "");
|
|
SETTIMERNAME(PTI_RS_RENDERMT, "rs_RenderMT", "");
|
|
SETTIMERNAME(PTI_RS_RENDERFOG, "rs_RenderFog", "");
|
|
SETTIMERNAME(PTI_RS_RENDERHAZE, "rs_RenderHaze", "");
|
|
|
|
// initialize counters
|
|
SETCOUNTERNAME(PCI_TEXTUREPREPARES, "texture prepares");
|
|
SETCOUNTERNAME(PCI_TEXTUREUPLOADS, "texture uploads");
|
|
SETCOUNTERNAME(PCI_TEXTUREUPLOADBYTES, "texture bytes uploaded");
|
|
SETCOUNTERNAME(PCI_CACHEDSHADOWS, "number of shadows cached");
|
|
SETCOUNTERNAME(PCI_FLATSHADOWS, "number of flat shadows");
|
|
SETCOUNTERNAME(PCI_CACHEDSHADOWBYTES, "shadow bytes cached");
|
|
SETCOUNTERNAME(PCI_DYNAMICSHADOWS, "number of dynamic shadows cached");
|
|
SETCOUNTERNAME(PCI_DYNAMICSHADOWBYTES, "dynamic shadow bytes cached");
|
|
SETCOUNTERNAME(PCI_RS_TRIANGLES, "RS: triangles");
|
|
SETCOUNTERNAME(PCI_RS_TRIANGLEPASSESORG, "RS: triangle*passes");
|
|
SETCOUNTERNAME(PCI_RS_TRIANGLEPASSESOPT, "RS: triangle*passesMT");
|
|
SETCOUNTERNAME(PCI_RS_POLYGONGROUPS, "RS: polygon groups");
|
|
}
|