MapWnd skip rendering in design & research windows

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

MapWnd skip rendering in design & research windows

#1 Post by vincele »

In MapWnd::Render() there's an early return path if the design window is shown, because it is in front of the whole screen. The research window case looks similar to me, is the attached patch sensible ?

[The extension diff has been deactivated and can no longer be displayed.]

FPS limiting disabled
FPS: map / design / research
With patch: 25 / 20 / 5
Without : 25 / 19(*) / 5

(*) I commented out the design window shortcut path

Can someone test, because on my system it makes no difference one way or the other, for my patch or the earlier one...

But this is an old laptop, on which FO is kind of sluggish:

Intel(R) Core(TM)2 Duo CPU U9400 @ 1.40GHz
4 GB Ram / old SSD
Intel GM45 Chipset

Coding is more enjoyable than really playing FO on this one...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MapWnd skip rendering in design & research windows

#2 Post by Geoff the Medio »


User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: MapWnd skip rendering in design & research windows

#3 Post by vincele »

Thanks, I hope it will make a difference for someone...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MapWnd skip rendering in design & research windows

#4 Post by Geoff the Medio »

vincele wrote:Thanks, I hope it will make a difference for someone...
Probably it will, although probably imperceptibly...

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: MapWnd skip rendering in design & research windows

#5 Post by vincele »

BTW, can someone explain why research window FPS is so low, it's really sluggish, the mouse lags behind. Why is this window display slower than the map or even design windows. The same question could be asked for design wrt map...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MapWnd skip rendering in design & research windows

#6 Post by Geoff the Medio »

There are many tech panels and arcs to render, each panel has a bunch of parts and text, and they're all done using repeated inefficient immediate mode OpenGL calls.

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: MapWnd skip rendering in design & research windows

#7 Post by vincele »

Geoff the Medio wrote:There are many tech panels and arcs to render, each panel has a bunch of parts and text, and they're all done using repeated inefficient immediate mode OpenGL calls.
OK, ouch...
is there so many more things to draw on this window or is the rendering more efficient for the map window ? I would have thought mapwnd has way more, but that's an uninformed guess...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MapWnd skip rendering in design & research windows

#8 Post by Geoff the Medio »

The MapWnd uses some slightly more advanced GL calls, including texture and vertex buffers. The TechTreeWnd just uses immediate GL calls, which when used many times, is slower. The MapWnd is also rendering a lot using relatively simple geometry (quads) rendered with a texture, while the TechTreeWnd uses a lot more calls to draw each segment of the curved outlines of tech panels.

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: MapWnd skip rendering in design & research windows

#9 Post by vincele »

OK, I just tried a quick test on another more recent laptop, but still not current
Athlon II P350 dual core
Mobility radeon HD 4200
Windows 7

The game is playable on this one, no noticeable lag, at least until far in the game.

~1-2 week-before-patch / after (7253-testwin32) - cannot load the saved game (turn 140) and FPS variability by zoom level is hampering the test too, take those with a Kg of salt...

Map 75 / 72
Design 75-80 / 98
Research 20 / 70
Production 50 / 62

It at least looks like it helped...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

Post Reply