mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Polymer screen resizing support. Fixes misaligned crosshair with full HUD.
git-svn-id: https://svn.eduke32.com/eduke32@1504 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f8f554206f
commit
d1e22bae52
1 changed files with 5 additions and 2 deletions
|
@ -652,7 +652,7 @@ void polymer_glinit(void)
|
|||
bglClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
bglClearStencil(0);
|
||||
bglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
bglViewport(0, 0, xdim, ydim);
|
||||
bglViewport(windowx1, yres-(windowy2+1),windowx2-windowx1+1, windowy2-windowy1+1);
|
||||
|
||||
// texturing
|
||||
bglEnable(GL_TEXTURE_2D);
|
||||
|
@ -672,7 +672,10 @@ void polymer_glinit(void)
|
|||
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
bglLoadIdentity();
|
||||
bgluPerspective((float)(pr_fov) / (2048.0f / 360.0f), (float)xdim / (float)ydim, 0.01f, 100.0f);
|
||||
bgluPerspective((float)(pr_fov) / (2048.0f / 360.0f),
|
||||
(float)(windowx2-windowx1+1) /
|
||||
(float)(windowy2-windowy1+1),
|
||||
0.01f, 100.0f);
|
||||
|
||||
bglMatrixMode(GL_MODELVIEW);
|
||||
bglLoadIdentity();
|
||||
|
|
Loading…
Reference in a new issue