2
0
Fork 0
mirror of https://github.com/Shpoike/Quakespasm.git synced 2025-03-14 14:52:05 +00:00

log indices for 1 frame

This commit is contained in:
Eric Wasylishen 2014-10-18 11:47:12 -06:00
parent 841a3b85fa
commit 94dbbc87be

View file

@ -648,6 +648,8 @@ static unsigned int num_vbo_indices;
static int nbatches = 0; static int nbatches = 0;
static int nsurfs = 0; static int nsurfs = 0;
static int logindices = 0;
/* /*
================ ================
R_ClearBatch R_ClearBatch
@ -697,6 +699,9 @@ static void R_BatchSurface (msurface_t *s)
num_vbo_indices += num_surf_indices; num_vbo_indices += num_surf_indices;
nsurfs++; nsurfs++;
if (logindices)
printf("%d\n", s->vbo_firstvert);
} }
/* /*
@ -1031,6 +1036,14 @@ void R_DrawTextureChains_Multitexture_VBO (qmodel_t *model, entity_t *ent, texch
uint64_t start = SDL_GetPerformanceCounter(); uint64_t start = SDL_GetPerformanceCounter();
static int done;
if (ent == NULL) {
if (!done) {
logindices = 1;
}
}
for (i=0 ; i<model->numtextures ; i++) for (i=0 ; i<model->numtextures ; i++)
{ {
msurface_t *lightmap_chains[MAX_LIGHTMAPS]; msurface_t *lightmap_chains[MAX_LIGHTMAPS];
@ -1095,6 +1108,11 @@ void R_DrawTextureChains_Multitexture_VBO (qmodel_t *model, entity_t *ent, texch
glDisable (GL_ALPHA_TEST); // Flip alpha test back off glDisable (GL_ALPHA_TEST); // Flip alpha test back off
} }
if (logindices) {
logindices = 0;
done = 1;
}
uint64_t end = SDL_GetPerformanceCounter(); uint64_t end = SDL_GetPerformanceCounter();
double ms = 1000.0 * ((end - start) / (double)SDL_GetPerformanceFrequency()); double ms = 1000.0 * ((end - start) / (double)SDL_GetPerformanceFrequency());