QGraphicsView

All and any discussion and development of the Mudlet Mapper.
Post Reply
User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

QGraphicsView

Post by chris » 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.

User avatar
Vadi
Posts: 4727
Joined: Sat Mar 14, 2009 3:13 pm

Re: QGraphicsView

Post by Vadi » Fri Jun 08, 2012 8:53 am

Heiko would have to answer that, I'm not certain.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: QGraphicsView

Post by chris » 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.

User avatar
Vadi
Posts: 4727
Joined: Sat Mar 14, 2009 3:13 pm

Re: QGraphicsView

Post by Vadi » Sat Jun 16, 2012 10:25 pm

CPU you mean?

GPU is hardware too, but it's brilliant for graphics.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: QGraphicsView

Post by chris » 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.

User avatar
Vadi
Posts: 4727
Joined: Sat Mar 14, 2009 3:13 pm

Re: QGraphicsView

Post by Vadi » Wed Dec 12, 2012 7:49 am

What is the latest news in this dept, if any?

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: QGraphicsView

Post by chris » 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).

User avatar
Vadi
Posts: 4727
Joined: Sat Mar 14, 2009 3:13 pm

Re: QGraphicsView

Post by Vadi » 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest