Re: [AD] About colors

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


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.

So you're proposing not changing the current behaviour at all.

I think the problem at hand is that OpenGL way, while understandable given knowledge of how OpenGL chooses what pixels to draw, is completely unintuitive to users. To get al_draw_filled_rectangle and al_draw_rectangle to line up at least one of them will have to be changed to work in the way that is not obvious from OpenGL point of view.

-SIegeLord




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