]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
init host_framecount to 0, just a cleanup
[xonotic/darkplaces.git] / gl_backend.c
index 8e4ec15895bd29c83d50abff0de154e6871041b1..5d63a28a7a82da5b5ae973c54800bebdade3be35 100644 (file)
@@ -256,7 +256,7 @@ void gl_backend_init(void)
 
 void GL_SetupView_Orientation_Identity (void)
 {
-       Matrix4x4_CreateIdentity(&backend_viewmatrix);
+       backend_viewmatrix = identitymatrix;
        memset(&backend_modelmatrix, 0, sizeof(backend_modelmatrix));
 }
 
@@ -445,7 +445,7 @@ void GL_SetupTextureState(void)
                unit->combinergb = GL_MODULATE;
                unit->combinealpha = GL_MODULATE;
                unit->texmatrixenabled = false;
-               unit->matrix = r_identitymatrix;
+               unit->matrix = identitymatrix;
        }
 
        for (i = 0;i < backendimageunits;i++)
@@ -1742,7 +1742,8 @@ void SCR_DrawScreen (void)
 {
        R_Mesh_Start();
 
-       R_TimeReport("setup");
+       if (r_timereport_active)
+               R_TimeReport("setup");
 
        if (cls.signon == SIGNONS)
        {
@@ -1818,7 +1819,8 @@ void SCR_DrawScreen (void)
 
        R_Mesh_Finish();
 
-       R_TimeReport("meshfinish");
+       if (r_timereport_active)
+               R_TimeReport("meshfinish");
 }
 
 void SCR_UpdateLoadingScreen (void)
@@ -1843,7 +1845,7 @@ void SCR_UpdateLoadingScreen (void)
        R_Textures_Frame();
        GL_SetupView_Mode_Ortho(0, 0, vid_conwidth.integer, vid_conheight.integer, -10, 100);
        R_Mesh_Start();
-       R_Mesh_Matrix(&r_identitymatrix);
+       R_Mesh_Matrix(&identitymatrix);
        // draw the loading plaque
        pic = Draw_CachePic("gfx/loading", false);
        x = (vid_conwidth.integer - pic->width)/2;
@@ -1904,7 +1906,8 @@ void SCR_UpdateScreen (void)
        qglClear(GL_COLOR_BUFFER_BIT);
        CHECKGLERROR
 
-       R_TimeReport("clear");
+       if (r_timereport_active)
+               R_TimeReport("clear");
 
        if (r_stereo_redblue.integer || r_stereo_redgreen.integer || r_stereo_redcyan.integer || r_stereo_sidebyside.integer)
        {
@@ -1947,7 +1950,8 @@ void SCR_UpdateScreen (void)
                SCR_DrawScreen();
 
        VID_Finish();
-       R_TimeReport("finish");
+       if (r_timereport_active)
+               R_TimeReport("finish");
 }