// GL is weird because it's bottom to top, r_refdef.view.y is top to bottom.
// Unless the render target is a FBO...
- viewy_adjusted = viewfbo ? viewy : vid.height - viewheight - viewy;
+ viewy_adjusted = viewfbo ? viewy : vid.mode.height - viewheight - viewy;
if (!r_refdef.view.useperspective)
R_Viewport_InitOrtho3D(&r_refdef.view.viewport, &r_refdef.view.matrix, viewx, viewy_adjusted, viewwidth, viewheight, r_refdef.view.ortho_x, r_refdef.view.ortho_y, -r_refdef.farclip, r_refdef.farclip, customclipplane);
// GL is weird because it's bottom to top, r_refdef.view.y is top to bottom.
// Unless the render target is a FBO...
- viewy_adjusted = viewfbo ? viewy : vid.height - viewheight - viewy;
+ viewy_adjusted = viewfbo ? viewy : vid.mode.height - viewheight - viewy;
R_Viewport_InitOrtho(&viewport, &identitymatrix, viewx, viewy_adjusted, viewwidth, viewheight, 0, 0, x2, y2, -10, 100, NULL);
R_Mesh_SetRenderTargets(viewfbo, viewdepthtexture, viewcolortexture, NULL, NULL, NULL);
viewscalefpsadjusted = 1.0f;
scale = r_viewscale.value * sqrt(viewscalefpsadjusted);
- if (vid.samples)
- scale *= sqrt(vid.samples); // supersampling
+ if (vid.mode.samples)
+ scale *= sqrt(vid.mode.samples); // supersampling
scale = bound(0.03125f, scale, 4.0f);
screentexturewidth = (int)ceil(r_refdef.view.width * scale);
screentextureheight = (int)ceil(r_refdef.view.height * scale);
Vector4Set(w[1], end[0], end[1], end[2], 1);
R_Viewport_TransformToScreen(&r_refdef.view.viewport, w[0], s[0]);
R_Viewport_TransformToScreen(&r_refdef.view.viewport, w[1], s[1]);
- x1 = s[0][0] * vid_conwidth.value / vid.width;
- y1 = (vid.height - s[0][1]) * vid_conheight.value / vid.height;
- x2 = s[1][0] * vid_conwidth.value / vid.width;
- y2 = (vid.height - s[1][1]) * vid_conheight.value / vid.height;
+ x1 = s[0][0] * vid_conwidth.value / vid.mode.width;
+ y1 = (vid.mode.height - s[0][1]) * vid_conheight.value / vid.mode.height;
+ x2 = s[1][0] * vid_conwidth.value / vid.mode.width;
+ y2 = (vid.mode.height - s[1][1]) * vid_conheight.value / vid.mode.height;
//Con_DPrintf("R_DebugLine: %.0f,%.0f to %.0f,%.0f\n", x1, y1, x2, y2);
// add the line to the UI mesh for drawing later
if (fabs(x2 - x1) > fabs(y2 - y1))
{
offsetx = 0;
- offsety = 0.5f * width * vid_conheight.value / vid.height;
+ offsety = 0.5f * width * vid_conheight.value / vid.mode.height;
}
else
{
- offsetx = 0.5f * width * vid_conwidth.value / vid.width;
+ offsetx = 0.5f * width * vid_conwidth.value / vid.mode.width;
offsety = 0;
}
surf = Mod_Mesh_AddSurface(mod, Mod_Mesh_GetTexture(mod, "white", 0, 0, MATERIALFLAG_WALL | MATERIALFLAG_VERTEXCOLOR | MATERIALFLAG_ALPHAGEN_VERTEX | MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW), true);