Re: [AD] Bug in clip3d_f() / polygon3d_f()

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


Ben Davis wrote :
> 
> I think Shawn has conventions for this. If it's static, it doesn't need an
> underline - otherwise it does.

Ok, go ahead ! But there is some things I'm wondering about :
1. why did you rename the clip_polygon_segment functions in your patch ?
2. if you plan to remove fill_edge_3d_structure[_f]() from aintern.h why
did you add the formerly named clip_polygon_segment_fixed to the headers
?

>
> I'm happy to do number 1. As for number 2, here's a quote from the docs:
> 
> "The u and v coordinates are only required when doing texture
> mapping, and specify the position of the point in the texture
> bitmap, for example 0, 0 maps the vertex onto the top left corner
> of the texture, and if the texture is sized 32x32, setting u=32
> and v=16 maps the vertex to the point half way down the right edge
> of the texture. The u/v coordinates wrap at the edge of the
> texture, so with a 32x32 texture, u=v=32 is the same as u=v=0.
> This can be used to tile textures several times across a polygon."

Well, there is nothing about top left corner of texels.

> 
> I think "the top left corner of the texture" is the top left corner of the
> texture, not half a texel's width and height into the texture. Likewise
> "half way down the right edge of the texture" does not mean slightly further
> than half way down, and beyond the right edge of the texture :-P
                     
This is *your* interpretation. But I agree the doc is ambiguous and
there is a need to clarify it. Here is a quote of the modification you
are suggesting for the docs :

"The u/v coordinates wrap at the edge of the texture, so with a 32x32
texture, u=v=32 is the same as u=v=0. This can be used to tile textures
several times across a polygon. Note that setting whole numbers for u
and v indicates the top-left corner of a pixel in the texture bitmap, so
if you set u=32, the last column of pixels that will be rendered is at
u=31."

There is one big issue :
- On one hand the original doc tells (and you keep it) that u=v=32 is
the same thing that u=v=0.
- On the other hand, a few lines later, you tell that u=32 rendered the
texel u=31.

The docs are now more ambiguous than they used to be :-) I now think
your convention is tricky : we are now supposed to tell the polygon
renderer to draw up to the texel u=32 in order to get the texel u=31
drawn ?!? And what about the texture tiling features (now u=32 is not
the same thing that u=0) ?!? IMHO that is not a good idea and I prefer
the old convention.

	Bertrand.



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