mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 11:50:09 +01:00
mesa: adjust glBitmap coords by a small epsilon
Fixes problem with bitmaps jumping around by one pixel depending on window size. The rasterpos is often X.9999 instead of X+1. Run progs/redbook/drawf and resize window to check. Cherry picked from gallium-0.1 branch
This commit is contained in:
parent
4f474c7d1e
commit
4e0e02ae68
1 changed files with 3 additions and 2 deletions
|
|
@ -374,8 +374,9 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
|
|||
|
||||
if (ctx->RenderMode == GL_RENDER) {
|
||||
/* Truncate, to satisfy conformance tests (matches SGI's OpenGL). */
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
|
||||
const GLfloat epsilon = 0.0001;
|
||||
GLint x = IFLOOR(ctx->Current.RasterPos[0] + epsilon - xorig);
|
||||
GLint y = IFLOOR(ctx->Current.RasterPos[1] + epsilon - yorig);
|
||||
|
||||
if (ctx->Unpack.BufferObj->Name) {
|
||||
/* unpack from PBO */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue