NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 11 12 13 14 15 … 93 Next »
More "efficient" redraw?

 
  • 0 Vote(s) - 0 Average
More "efficient" redraw?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#41
2012-01-14, 07:08 PM
If you can post an updated version of that test code, without that background thread exception, I'm happy to take another look.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#42
2012-01-14, 07:10 PM
I can post one shortly for you that uses a DateTime comparison instead of a timer. The same problem occurs. I'm just not at that machine at the moment.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#43
2012-01-14, 07:18 PM
Quote:A few general questions:
1) How often is NeedsRendering() called?
Almost continuously, and you return 'true' if you want the screen updating. It's called this often to allow for smooth animation etc. This follows the message loop design pattern commonly used by direct3d games.

Quote:2) If GetRenderList() is supposed to be static, why is it called every time a render takes place instead of the list being "cached"? Or do you expect the plugin code to cache the list instead of recreating each time?
The screen is made up of multiple elements from different sources, including the background, the clock, now playing info, active plugin, popup, screen saver etc, and any of these can change at any time, so each time the screen is redrawn it askes each of these things for it's renderlist - these dont have to have changed though, ie your GetRenderList() function doesnt need to have redrawn anything since last time it was called, and behind the scenes this will very low overhead - ie, tells the direct3d functions of your graphics card to render the direct3d texture it already loaded last time, and display it at location x,y. This is very low overhead and can be used for quick animations. Stored internally in the lower level UiElement class is direct3d texture handles etc, and these will only be reloaded if you've updated the images in your render list.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#44
2012-01-14, 07:21 PM
sub Wrote:If you can post an updated version of that test code, without that background thread exception, I'm happy to take another look.

Attached
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#45
2012-01-14, 07:40 PM
I can see what is happening, but not 100% on the best way to fix it. It relates to the clock element at the top right of the screen wanting to update, but not getting a chance to because you're returning an element named "screensaver-...." even though it's not really a screen saver. If it were a real screen saver, it wouldnt be checking the clock for updates.

In your plugin are you really wanting to be able to show a screen saver? If so, the best fix is probably my to add methods like this to IPluginHelper:

void ShowScreenSaver(IScreenPlugin screenPlugin);
void RemoveScreenSaver();
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#46
2012-01-14, 08:00 PM
I just want to be able to have a completely black background (not show the clock in the corner). If to treat it like a real screensaver is best then that would be fine. Thanks.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#47
2012-01-14, 08:07 PM
you can use
Code:
blackUiElement = new UiElement("block-extras-black", new RectangleF(0, 0, 100, 100), black);
to get a black background without having to run as a screensaver.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#48
2012-01-14, 08:21 PM
That may cause the same thing.
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#49
2012-01-14, 08:21 PM
I think that only works for normal "screens" and not popups.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#50
2012-01-14, 08:42 PM
I've put in a fix for the next release. You wont need to change anything in your code.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to force redraw? Wakalaka 3 1,807 2007-03-27, 09:58 AM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode