Page 1 of 1
Posted: Fri Jun 08, 2012 3:08 am
I came across QGraphicsView today while looking at some QT documentation. Is there a reason our mapper isn't using this layout? It seems like it would allow for a lot of functionality for very little work.
Posted: Fri Jun 08, 2012 8:53 am
Heiko would have to answer that, I'm not certain.
Posted: Sat Jun 16, 2012 9:54 pm
I gave it a try and the rendering is slower than what we have going now, which is sort of expected since we call QPixmap which ties into the hardware.
Posted: Sat Jun 16, 2012 10:25 pm
CPU you mean?
GPU is hardware too, but it's brilliant for graphics.
Posted: Sun Jun 17, 2012 7:12 pm
I'm going to pursue this avenue for a bit, the performance on real maps when the code is unoptimized is indistinguishable from the current mapper. It also lets me treat each entity on the map as an object easily, set Z levels to automagically handle draw orders, etc. I can also subclass the graphic items, so I can subclass a Room, a Line, or a label, and within that subclass define the behavior/submenus from right/left clicking.
Anyone who wants to follow the progress can grab it from the GraphicsView branch on my git repo.
Posted: Wed Dec 12, 2012 7:49 am
What is the latest news in this dept, if any?
Posted: Wed Dec 12, 2012 2:24 pm
It's on the backburner. Once you start adding in labels/rooms/exits the map slows down considerably when it gets to big enough sizes. I think it's better to make the current mapper use some of the QGraphicsView-like implementations (such as having rooms/lines/etc be a class).
Posted: Wed Dec 12, 2012 8:16 pm
Hm, yeah. I did try it out on a giant one-area-world map and it was way, way slow.