mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +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
|
#define __gl_draw_h
|
||||||
|
|
||||||
void GL_Set2D (void);
|
void GL_Set2D (void);
|
||||||
|
void GL_Set2DScaled (void);
|
||||||
void GL_DrawReset (void);
|
void GL_DrawReset (void);
|
||||||
void GL_FlushText (void);
|
void GL_FlushText (void);
|
||||||
|
|
||||||
|
|
|
@ -794,19 +794,14 @@ Draw_FadeScreen (void)
|
||||||
Sbar_Changed ();
|
Sbar_Changed ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static void
|
||||||
GL_Set2D
|
set_2d (int width, int height)
|
||||||
|
|
||||||
Setup as if the screen was 320*200
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
GL_Set2D (void)
|
|
||||||
{
|
{
|
||||||
qfglViewport (glx, gly, glwidth, glheight);
|
qfglViewport (glx, gly, glwidth, glheight);
|
||||||
|
|
||||||
qfglMatrixMode (GL_PROJECTION);
|
qfglMatrixMode (GL_PROJECTION);
|
||||||
qfglLoadIdentity ();
|
qfglLoadIdentity ();
|
||||||
qfglOrtho (0, vid.conwidth, vid.conheight, 0, -99999, 99999);
|
qfglOrtho (0, width, height, 0, -99999, 99999);
|
||||||
|
|
||||||
qfglMatrixMode (GL_MODELVIEW);
|
qfglMatrixMode (GL_MODELVIEW);
|
||||||
qfglLoadIdentity ();
|
qfglLoadIdentity ();
|
||||||
|
@ -823,6 +818,18 @@ GL_Set2D (void)
|
||||||
qfglDisableClientState (GL_COLOR_ARRAY);
|
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
|
void
|
||||||
GL_DrawReset (void)
|
GL_DrawReset (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -256,6 +256,8 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
|
||||||
// draw any areas not covered by the refresh
|
// draw any areas not covered by the refresh
|
||||||
SCR_TileClear ();
|
SCR_TileClear ();
|
||||||
|
|
||||||
|
GL_Set2DScaled ();
|
||||||
|
|
||||||
while (*scr_funcs) {
|
while (*scr_funcs) {
|
||||||
(*scr_funcs)();
|
(*scr_funcs)();
|
||||||
scr_funcs++;
|
scr_funcs++;
|
||||||
|
|
Loading…
Reference in a new issue