mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
fix viewsize interaction with the cleaned up screen size handling
This commit is contained in:
parent
e0cfe795b0
commit
a2fa2d425b
3 changed files with 18 additions and 8 deletions
|
@ -30,6 +30,7 @@
|
|||
#define __gl_draw_h
|
||||
|
||||
void GL_Set2D (void);
|
||||
void GL_Set2DScaled (void);
|
||||
void GL_DrawReset (void);
|
||||
void GL_FlushText (void);
|
||||
|
||||
|
|
|
@ -794,19 +794,14 @@ Draw_FadeScreen (void)
|
|||
Sbar_Changed ();
|
||||
}
|
||||
|
||||
/*
|
||||
GL_Set2D
|
||||
|
||||
Setup as if the screen was 320*200
|
||||
*/
|
||||
void
|
||||
GL_Set2D (void)
|
||||
static void
|
||||
set_2d (int width, int height)
|
||||
{
|
||||
qfglViewport (glx, gly, glwidth, glheight);
|
||||
|
||||
qfglMatrixMode (GL_PROJECTION);
|
||||
qfglLoadIdentity ();
|
||||
qfglOrtho (0, vid.conwidth, vid.conheight, 0, -99999, 99999);
|
||||
qfglOrtho (0, width, height, 0, -99999, 99999);
|
||||
|
||||
qfglMatrixMode (GL_MODELVIEW);
|
||||
qfglLoadIdentity ();
|
||||
|
@ -823,6 +818,18 @@ GL_Set2D (void)
|
|||
qfglDisableClientState (GL_COLOR_ARRAY);
|
||||
}
|
||||
|
||||
void
|
||||
GL_Set2D (void)
|
||||
{
|
||||
set_2d (vid.width, vid.height);
|
||||
}
|
||||
|
||||
void
|
||||
GL_Set2DScaled (void)
|
||||
{
|
||||
set_2d (vid.conwidth, vid.conheight);
|
||||
}
|
||||
|
||||
void
|
||||
GL_DrawReset (void)
|
||||
{
|
||||
|
|
|
@ -256,6 +256,8 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
|
|||
// draw any areas not covered by the refresh
|
||||
SCR_TileClear ();
|
||||
|
||||
GL_Set2DScaled ();
|
||||
|
||||
while (*scr_funcs) {
|
||||
(*scr_funcs)();
|
||||
scr_funcs++;
|
||||
|
|
Loading…
Reference in a new issue