From: Norman Vine <nhv@ca...> - 2002-10-05 19:54:05
Paul Spencer writes:
> I have discovered another weakness in the current implementation of
> display lists.
> When any ogrfs tool is drawn at an offset (i.e. label), the offset is
> specified in pixels. gvshapeslayer converts the current point (in
> geographic coordinates) to pixel coordinates, applies the offset and
> converts back to determine where to draw the tool. This works (or
> worked) fine when the locations were calculated on every draw. However,
> when using the current display list implementation, the offset gets
> bigger or smaller as you zoom in/out, which is not the desired effect.
> Note this only affects you if you use offsets, not if you display at
> the exact location of the point.
> That's the problem. I see some possible solutions, perhaps there are
> some I haven't considered. Feedback on my or other solutions would be
> 5. it is not possible to change a display list once created. However,
> it is possible to nest display lists. We could nest display lists for
> labels and symbols, and re-create them if a zoom happens. As long as
> you use the same name (number) then it works as if you had a mutable
> display list (at least, according to my book ;) )
6) Instead of rebuilding the entire display list you could add new
display lists consisting only of a glTranslate() around the effected
displaylist and just change these. This could also be done with only
one extra display list per by adding a glPushMatrix() in the new list
and a glPopMatrix() at the end of the succeeding list.
I am not neccessarily advocating this approach but it is another
option that result in doing less work esp if the changing offsets are
the same for more then one list
Get latest updates about Open Source Projects, Conferences and News.