mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[gl/glsl] Shift the 2d view by 0.5 pixels in X and Y
Fixes top and left edge lines not being visible (same story as vulkan).
This commit is contained in:
parent
2d634b7cf7
commit
c0e3821fa6
2 changed files with 3 additions and 2 deletions
|
@ -970,7 +970,7 @@ set_2d (int width, int height)
|
|||
|
||||
qfglMatrixMode (GL_PROJECTION);
|
||||
qfglLoadIdentity ();
|
||||
qfglOrtho (0, width, height, 0, -99999, 99999);
|
||||
qfglOrtho (-0.5, width - 0.5, height - 0.5, -0.5, -99999, 99999);
|
||||
|
||||
qfglMatrixMode (GL_MODELVIEW);
|
||||
qfglLoadIdentity ();
|
||||
|
|
|
@ -799,7 +799,8 @@ set_2d (int width, int height)
|
|||
qfeglDisable (GL_DEPTH_TEST);
|
||||
qfeglDisable (GL_CULL_FACE);
|
||||
|
||||
ortho_mat (proj_matrix, 0, width, height, 0, -99999, 99999);
|
||||
ortho_mat (proj_matrix, -0.5, width - 0.5, height - 0.5, -0.5,
|
||||
-99999, 99999);
|
||||
|
||||
qfeglUseProgram (quake_2d.program);
|
||||
qfeglEnableVertexAttribArray (quake_2d.vertex.location);
|
||||
|
|
Loading…
Reference in a new issue