]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.c
fix win32 stack overflows in CL_ParseServerInfo, it was choking on the sheer quantity...
[xonotic/darkplaces.git] / cl_screen.c
index 5abb2196485b195b6812a1c0c89e51ffb9cb67b9..4c369fead832100dc444e4ed08017c105d19a0ce 100644 (file)
@@ -350,6 +350,10 @@ void R_TimeReport(char *desc)
        }
 }
 
+extern int c_rt_lights, c_rt_clears, c_rt_scissored;
+extern int c_rt_shadowmeshes, c_rt_shadowtris, c_rt_lightmeshes, c_rt_lighttris;
+extern int c_rtcached_shadowmeshes, c_rtcached_shadowtris;
+extern int r_shadow_lightingmode;
 void R_TimeReport_Start(void)
 {
        r_timereport_active = r_speeds.integer && cls.signon == SIGNONS && cls.state == ca_connected;
@@ -367,6 +371,16 @@ void R_TimeReport_Start(void)
                        c_faces, c_nodes, c_leafs, c_light_polys,
                        c_models, c_bmodels, c_sprites, c_particles, c_dlights,
                        c_alias_polys, c_meshs, c_meshelements / 3);
+               if (r_shadow_lightingmode)
+               {
+                       sprintf(r_speeds_string + strlen(r_speeds_string),
+                               "realtime lighting:%4i lights%4i clears%4i scissored\n"
+                               "dynamic: %6i shadowmeshes%6i shadowtris%6i lightmeshes%6i lighttris\n"
+                               "precomputed: %6i shadowmeshes%6i shadowtris\n",
+                               c_rt_lights, c_rt_clears, c_rt_scissored,
+                               c_rt_shadowmeshes, c_rt_shadowtris, c_rt_lightmeshes, c_rt_lighttris,
+                               c_rtcached_shadowmeshes, c_rtcached_shadowtris);
+               }
 
                c_alias_polys = 0;
                c_light_polys = 0;
@@ -602,7 +616,7 @@ void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags)
        m->texture = mesh->texture;
        m->indices   = p;memcpy(m->indices  , mesh->indices  , m->numtriangles * sizeof(int[3]));(qbyte *)p += m->numtriangles * sizeof(int[3]);
        m->vertices  = p;memcpy(m->vertices , mesh->vertices , m->numvertices * sizeof(float[4]));(qbyte *)p += m->numvertices * sizeof(float[4]);
-       m->texcoords = p;memcpy(m->texcoords, mesh->texcoords, m->numvertices * sizeof(float[2]));(qbyte *)p += m->numvertices * sizeof(float[2]);
+       m->texcoords = p;memcpy(m->texcoords, mesh->texcoords, m->numvertices * sizeof(float[4]));(qbyte *)p += m->numvertices * sizeof(float[4]);
        m->colors    = p;memcpy(m->colors   , mesh->colors   , m->numvertices * sizeof(float[4]));(qbyte *)p += m->numvertices * sizeof(float[4]);
        r_refdef.drawqueuesize += dq->size;
 }
@@ -933,6 +947,7 @@ void CL_SetupScreenSize(void)
        SCR_CalcRefdef();
 }
 
+extern void R_Shadow_EditLights_DrawSelectedLightProperties(void);
 void CL_UpdateScreen(void)
 {
        if (!scr_initialized || !con_initialized || vid_hidden)
@@ -984,6 +999,7 @@ void CL_UpdateScreen(void)
                        R_TimeReport_End();
                        R_TimeReport_Start();
                }
+               R_Shadow_EditLights_DrawSelectedLightProperties();
        }
        SCR_DrawConsole();