mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-06-08 09:31:58 +00:00
Keep track of total number of GL render calls
This commit is contained in:
parent
65b1983c61
commit
cba3535487
3 changed files with 7 additions and 2 deletions
|
@ -4590,7 +4590,7 @@ void DSQ::onUpdate(float dt)
|
|||
if (isDeveloperKeys() && fpsText && cmDebug && cmDebug->alpha == 1)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << "FPS: " << core->fps << " | ROC: " << core->renderObjectCount;
|
||||
os << "FPS: " << core->fps << " | ROC: " << core->renderObjectCount << " | RC: " << Core::dbg_numRenderCalls;
|
||||
os << " | p: " << core->processedRenderObjectCount << " | t: " << core->totalRenderObjectCount;
|
||||
os << " | s: " << dsq->continuity.seconds;
|
||||
os << " | evQ: " << core->eventQueue.getSize();
|
||||
|
|
|
@ -1840,11 +1840,13 @@ void Core::setSDLGLAttributes()
|
|||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
unsigned int Core::dbg_numRenderCalls = 0;
|
||||
|
||||
#ifdef BBGE_BUILD_OPENGL_DYNAMIC
|
||||
#define GL_FUNC(ret,fn,params,call,rt) \
|
||||
extern "C" { \
|
||||
static ret (GLAPIENTRY *p##fn) params = NULL; \
|
||||
ret GLAPIENTRY fn params { rt p##fn call; } \
|
||||
ret GLAPIENTRY fn params { ++Core::dbg_numRenderCalls; rt p##fn call; } \
|
||||
}
|
||||
#include "OpenGLStubs.h"
|
||||
#undef GL_FUNC
|
||||
|
@ -3006,6 +3008,8 @@ void Core::main(float runTime)
|
|||
|
||||
updateCullData();
|
||||
|
||||
dbg_numRenderCalls = 0;
|
||||
|
||||
if (settings.renderOn)
|
||||
{
|
||||
if (verbose) debugLog("dark layer prerender");
|
||||
|
|
|
@ -1310,6 +1310,7 @@ public:
|
|||
int zgaSave(const char *filename, short int width, short int height, unsigned char pixelDepth, unsigned char *imageData);
|
||||
|
||||
volatile int dbg_numThreadDecoders;
|
||||
static unsigned int dbg_numRenderCalls;
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue