[AD] [ alleg-Bugs-3367185 ] al_draw_rectangle misses bottom-left corner pixel |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "SourceForge.net" <noreply@xxxxxxxxxx>
- Subject: [AD] [ alleg-Bugs-3367185 ] al_draw_rectangle misses bottom-left corner pixel
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Fri, 15 Jul 2011 13:36:49 +0000
Bugs item #3367185, was opened at 2011-07-14 12:00
Message generated for change (Comment added) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3367185&group_id=5665
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Addons
Group: 5.1
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: al_draw_rectangle misses bottom-left corner pixel
Initial Comment:
When the thickness is negative, the implementation on DirectX misses 1 pixel on the bottom-left corner of the rectangle.
This is because the ALLEGRO_PRIM_LINE_LOOP is simulated by adding final closing line to the vertex buffer, but it is drawn in opposite direction.
To fix, the direction of final closing line must be from bottom to up, i.e. from last point in buffer to first one.
----------------------------------------------------------------------
Comment By: https://www.google.com/accounts ()
Date: 2011-07-15 13:36
Message:
When using "thick" lines, the implementation needs to setup twice as many
triangles. For frames e.g. in GUI, this is unneeded and slow.
I fixed it by adding the starting point as the last point too and used
LINE_STRIP on it instead of LINE_LOOP.
And yes, when the DirectX draws a line primitive, the ending pixel is not
drawn. So, switching the order of final line endpoints drawn should fix it.
----------------------------------------------------------------------
Comment By: Elias Pschernig (elias)
Date: 2011-07-14 12:11
Message:
As the documentation says, the missing pixel is expected - you need to
specify a thickness to avoid it. Do you have a link to some DirectX
documentation specifying the rasterization rule which draws different
pixels depending on the line direction?
In OpenGL it makes no difference and the pixel is always missing no matter
which way the line is drawn - so we can't fix it in general. If it can be
fixed for DirectX that should still be done of course. Myself I can't make
a patch since I don't have Windows though.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=3367185&group_id=5665