[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On June 16, 2010, Elias Pschernig wrote:
> On Wed, Jun 16, 2010 at 8:47 AM, Thomas Fjellstrom
<tfjellstrom@xxxxxxxxxx>wrote:
> > On June 15, 2010, Trent Gamblin wrote:
> > > On Tue, June 15, 2010 1:12 pm, Pavel Sountsov said:
> > > > Here are the alternatives so far: the task is to draw a rectangle
> > > > with an outline. We also want to highlight the top and bottom
> > > > edges with a different color using lines.
> > >
> > > > 1. Current implementation:
> > > The more I think about this and hear all the different options, the
> > > more I think we should keep it simple and go with OpenGL expected
> > > behaviour... Which I think is what Elias has been pushing all along.
> > > It makes sense now that I understand the "growing symmetrically"
> > > bit..
> >
> > Not sure I can agree with that. We should probably change to use a GL
> > coordinate space as well, if we are going to "stick to OpenGL expected
> > behavior".
>
> Well, don't call it "OpenGL expected behavior", call it "expected
> behavior" then. It's how it works in DirectX, in Cairo, in Clutter...
> it's basically how it works in any serious graphics API. The pixel-grid
> assumption just is only good when you want to make retro-games.
> Pixel-independent coordinates on the other hand allow doing exactly the
> same thing as with A4 (it's not *that* hard to understand it) but also
> allow a lot more.
funny, I tried using Qt's GraphicsView and painter stuff, which also
supports primitives and rotation/transformations. Turns out you don't want
to do multiple drawing commands in a single transform. It causes noticeable
gaps beween items. I've even seen kwin do the same thing when transforming
windows for the "window wobble" plugin. I just don't think its possible to
actually implement a glitch free primitive rendering framework while
supporting arbitrary transforms.. At least not without pre-rendering. In my
board game I solved the glitches just by pre-rendering the dialog, and only
doing a single "blit" rather than a bunch of separate ones.
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx