Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to force a redraw?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Cardanine  
View profile  
 More options Aug 15 2011, 9:36 pm
From: Cardanine <cardan...@gmail.com>
Date: Mon, 15 Aug 2011 18:36:17 -0700 (PDT)
Local: Mon, Aug 15 2011 9:36 pm
Subject: How to force a redraw?
Hi, is there any way to force the window to be repainted?

I'm using DX9 to render, and when I get a device lost event, I release
all my texture resources and recreate them when I reset my device. At
this point the textures are empty and I need to get the browser to
repaint everything. I can't use Window->Refresh() as that reloads the
URL, nor can I use Window->Resize() since the size of the window
didn't necessarily change (and passing the unchanged width and height
to Resize() does nothing).

Does anyone know how to get the window to simply repaint itself?

Thanks,
Nick


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ewen Cheslack-Postava  
View profile  
 More options Aug 16 2011, 12:28 am
From: Ewen Cheslack-Postava <ewe...@cs.stanford.edu>
Date: Mon, 15 Aug 2011 21:28:09 -0700
Local: Tues, Aug 16 2011 12:28 am
Subject: Re: [Berkelium] How to force a redraw?

On Mon, Aug 15, 2011 at 6:36 PM, Cardanine <cardan...@gmail.com> wrote:
> Hi, is there any way to force the window to be repainted?

> I'm using DX9 to render, and when I get a device lost event, I release
> all my texture resources and recreate them when I reset my device. At
> this point the textures are empty and I need to get the browser to
> repaint everything. I can't use Window->Refresh() as that reloads the
> URL, nor can I use Window->Resize() since the size of the window
> didn't necessarily change (and passing the unchanged width and height
> to Resize() does nothing).

I don't think think there's a way to force it to redraw. You could, of
course, *actually* resize it and then resize it back.

> Does anyone know how to get the window to simply repaint itself?

Alternatively, you could force a redraw by causing it to reflow the
page (insert & remove an element that forces the layout to change) or
even just by plastering a absolutely positioned div over the entire
thing and then removing it.

Both hacks, but I think they'd work. Of course you can also just keep
a copy of the texture yourself.

-Ewen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Muhammed İkbal Akpaça  
View profile  
 More options Sep 28 2012, 10:57 am
From: Muhammed İkbal Akpaça <sae...@gmail.com>
Date: Fri, 28 Sep 2012 07:57:45 -0700 (PDT)
Local: Fri, Sep 28 2012 10:57 am
Subject: Re: [Berkelium] How to force a redraw?

might help someone in future.

if you have jquery this does this does the job.

ExecuteScript("$('body').hide().show(0)");


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »