Markus Wick <[email protected]> writes: > First, I like to have some common functions to compile our shaders, bind > common uniforms, defining common headers, ... > But tbh I don't see why it's easier to split up the glsl source > completely. Most shaders aren't more than 5 loc, so they are easier to > read entirely. > In dolphin, we've a common glsl "header" which is prepended for every > shader and all common functions are defined there. Wouldn't such a > "framework" be enough?
It's a hard trade-off -- the current code has the advantage of separating out the fill code from the geometry code, which makes things like tiled text 'free' to implement, which seems like a feature to me. >> + * To get GL_POINTS drawn in the right spot, we need to adjust the >> + * coordinates by 1/2 a pixel. This doesn't hurt rectangles at >> + * all, so we just always do it. If we need to change someday, we >> + * can add a parameter to this function > > This does hurt. Points must be placed on pixel center, but polygon > border on pixel center is undefined behavoir. > Hopefully we won't render lines. I guess for horizontal lines, x must be > on pixel border and y on pixel center... Eric mentioned this and I've added a parameter which does this now. -- [email protected]
pgpuo4ipnXds1.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
