mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[vulkan] Shift the 2d view by 0.5 pixels in X and Y
Lines drawn along the top and left edges were not displayed because they were just off screen.
This commit is contained in:
parent
ba9a071b1c
commit
2d634b7cf7
1 changed files with 5 additions and 3 deletions
|
@ -360,9 +360,11 @@ vulkan_set_2d (int scaled)
|
|||
__auto_type mctx = vulkan_ctx->matrix_context;
|
||||
__auto_type mat = &mctx->matrices;
|
||||
|
||||
int width = vid.width; //FIXME vid
|
||||
int height = vid.height;
|
||||
QFV_Orthographic (mat->Projection2d, 0, width, 0, height, 0, 99999);
|
||||
float left = -0.5;
|
||||
float top = -0.5;
|
||||
float right = left + vid.width; //FIXME vid
|
||||
float bottom = top + vid.height;
|
||||
QFV_Orthographic (mat->Projection2d, left, right, top, bottom, 0, 99999);
|
||||
|
||||
mctx->dirty = mctx->frames.size;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue