Re: [AD] About colors

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, Jun 15, 2010 at 4:33 PM, Pavel Sountsov <slabode@xxxxxxxxxx> wrote:


By the 'same coordinates' do you also mean same sense of exclusivity? I
want to try to make both coordinates of al_draw_line to be inclusive
(like in A4). Does this mean you now support the bottom right rectangle
coordinates to be inclusive also?


There is no inclusive and exclusive in OpenGL and DX - I think we shold keep that. For example if you do this:

al_draw_rectangle(0.12, 0.12, 0. 34, 0.34)

Then that's perfectly fine, it's a rectangle within the first pixel. Since it does not contain the pixel center, OpenGL would ignore it (I still don't know about DirectX). Of course if you use transformations to scale it to 10th the size, it would now do the same as:

al_draw_rectangle(1.2, 1.2, 3.4, 3.4)

Again, you can picture the (pixel-independent) rectangle between those coordinates. The pixel from 1/1 to 2/2 would be lit (it's center is inside) the pixel from 3/3 to 4/4 would be not.

Why this is important is multi-sampling which usually always looks better on cards which support it. There the coverage of the final pixel decides how much of the fragment color gets used.

But in the end those examples are just to make clear that there is no exclusive/inclusive at all with floating point coordinates.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/