]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
R_SetView now supports VF_CLEARSCREEN which decides whether to clear the screen or...
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Jan 2008 18:49:34 +0000 (18:49 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Jan 2008 18:49:34 +0000 (18:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8026 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
csprogs.h

index 5283ffb66cc21a9a96caa493c21a8064d450c0c1..b566f0521451c4bb055898eaf4f07f8fe1df5e4f 100644 (file)
@@ -683,6 +683,7 @@ void VM_CL_R_ClearScene (void)
        r_refdef.view.frustum_y *= r_refdef.frustumscale_y;
        r_refdef.view.ortho_x = scr_fov.value * (3.0 / 4.0) * (float)r_refdef.view.width / (float)r_refdef.view.height / vid_pixelheight.value;
        r_refdef.view.ortho_y = scr_fov.value * (3.0 / 4.0);
+       r_refdef.view.clear = true;
        // FIXME: restore cl.csqc_origin
        // FIXME: restore cl.csqc_angles
        cl.csqc_vidvars.drawworld = true;
@@ -836,6 +837,9 @@ void VM_CL_R_SetView (void)
        case VF_PERSPECTIVE:
                r_refdef.view.useperspective = k != 0;
                break;
+       case VF_CLEARSCREEN:
+               r_refdef.view.clear = k ? true : false;
+               break;
        default:
                PRVM_G_FLOAT(OFS_RETURN) = 0;
                VM_Warning("VM_CL_R_SetView : unknown parm %i\n", c);
index 964f1214917f4a4cfa8f41663f12af201289f03f..4605a7e65f86d90463f27ff0b7a14b6c290a5f3e 100644 (file)
--- a/csprogs.h
+++ b/csprogs.h
@@ -39,6 +39,7 @@
 #define VF_CL_VIEWANGLES_Z     36      //(float)
 
 #define VF_PERSPECTIVE         200 //(float)
+#define VF_CLEARSCREEN         201 //(float)
 
 #define RF_VIEWMODEL           1       // The entity is never drawn in mirrors. In engines with realtime lighting, it casts no shadows.
 #define RF_EXTERNALMODEL       2       // The entity is appears in mirrors but not in the normal view. It does still cast shadows in engines with realtime lighting.