float m[16];
memset(v, 0, sizeof(*v));
- if(v_flipped.integer)
- frustumx = -frustumx;
-
v->type = R_VIEWPORTTYPE_PERSPECTIVE;
v->cameramatrix = *cameramatrix;
v->x = x;
if (nearplane)
R_Viewport_ApplyNearClipPlaneFloatGL(v, m, nearplane[0], nearplane[1], nearplane[2], nearplane[3]);
+ if(v_flipped.integer)
+ {
+ m[0] = -m[0];
+ m[4] = -m[4];
+ m[8] = -m[8];
+ m[12] = -m[12];
+ }
+
Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m);
}
float m[16];
memset(v, 0, sizeof(*v));
- if(v_flipped.integer)
- frustumx = -frustumx;
-
v->type = R_VIEWPORTTYPE_PERSPECTIVE_INFINITEFARCLIP;
v->cameramatrix = *cameramatrix;
v->x = x;
if (nearplane)
R_Viewport_ApplyNearClipPlaneFloatGL(v, m, nearplane[0], nearplane[1], nearplane[2], nearplane[3]);
+ if(v_flipped.integer)
+ {
+ m[0] = -m[0];
+ m[4] = -m[4];
+ m[8] = -m[8];
+ m[12] = -m[12];
+ }
+
Matrix4x4_FromArrayFloatGL(&v->projectmatrix, m);
}