comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: object graphics tvrd problem....
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: object graphics tvrd problem.... [message #64423] Mon, 29 December 2008 17:16
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
I'm late on this but yes, with at least linux and Windows when you're
using hardware rendering and grab the contents of the window, you get
whatever is currently displayed on your screen within the bounds of the
drawing area of your IDLgrWindow. IDL is just copying the PC's frame
buffer. Software rendering or rendering to an IDLgrBuffer (which also
uses the software renderer) doesn't suffer from this limitation since
IDL has access to the data before it is copied to the frame buffer.

This is a bit of a issue since I generally prefer to use hardware
rendering for the anti-aliased output it generates so when creating
animations I have to be really careful not to move the mouse over or pop
up another window in front of my IDL window.

-Rick


David Fanning wrote:
> ghgm2008@gmail.com writes:
>
>> That works - thanks !!
>
> Ah ha. One of those life lessons for anyone working
> with object graphics. ;-)
>
> Cheers,
>
> David
Re: object graphics tvrd problem.... [message #64426 is a reply to message #64423] Mon, 29 December 2008 12:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ghgm2008@gmail.com writes:

> That works - thanks !!

Ah ha. One of those life lessons for anyone working
with object graphics. ;-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: object graphics tvrd problem.... [message #64428 is a reply to message #64426] Mon, 29 December 2008 12:46 Go to previous message
ghgm2008 is currently offline  ghgm2008
Messages: 17
Registered: December 2008
Junior Member
On Dec 29, 1:39 pm, David Fanning <n...@dfanning.com> wrote:
> George writes:
>> Yeh, retain=2 doesn't do it and your show solution doesn't fully work
>> - the window does 'show' but the screengrab is still black in areas
>> where other
>> windows were covering.
>
>> I think it might be something to do with my graphics card -
>
>> Is there a way to do this with the Z-buffer ?
>
> Well, the object graphics are suppose to *be* a Z-buffer,
> so I wouldn't know how to do this off-hand.
>
> Since you think it is a graphics card issue, have you
> tried doing your window rendering in software, rather than
> hardware? Set the RENDERER keyword equal to 1 on your
> WIDGET_DRAW call.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

That works - thanks !!

George.
Re: object graphics tvrd problem.... [message #64429 is a reply to message #64428] Mon, 29 December 2008 12:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George writes:

> Yeh, retain=2 doesn't do it and your show solution doesn't fully work
> - the window does 'show' but the screengrab is still black in areas
> where other
> windows were covering.
>
> I think it might be something to do with my graphics card -
>
> Is there a way to do this with the Z-buffer ?

Well, the object graphics are suppose to *be* a Z-buffer,
so I wouldn't know how to do this off-hand.

Since you think it is a graphics card issue, have you
tried doing your window rendering in software, rather than
hardware? Set the RENDERER keyword equal to 1 on your
WIDGET_DRAW call.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: object graphics tvrd problem.... [message #64430 is a reply to message #64429] Mon, 29 December 2008 12:26 Go to previous message
ghgm2008 is currently offline  ghgm2008
Messages: 17
Registered: December 2008
Junior Member
On Dec 29, 12:43 pm, David Fanning <n...@dfanning.com> wrote:
> ghgm2...@gmail.com writes:
>> I have an object graphics program and I want this to write a .png file
>> every minute - via a screengrab.
>> Under OSX this works fine - no problem... but on my main work machine
>> (LINUX) it grabs the screen too literally
>> - I get any windows in front - the screensaver - all sorts of stuff.
>
>> How do I make sure that the screengrab just grabs the correct window ?
>
> I would try showing the window before you take a snapshot
> of it. Maybe even waiting a second or so to give the graphics
> engine time to catch up:
>
>    info.Main_Window -> Show, 1
>    Wait, 0.75
>    info.Main_Window -> GetProperty, IMAGE_DATA=snapshot
>
> Let me know if this works. :-)
>
> Cheers,
>
> David
>
> P.S. I would have thought setting RETAIN=2 on your Widget_Draw
> call would have solved the problem, though.
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")


Thanks for the help David...
Yeh, retain=2 doesn't do it and your show solution doesn't fully work
- the window does 'show' but the screengrab is still black in areas
where other
windows were covering.

I think it might be something to do with my graphics card -

Is there a way to do this with the Z-buffer ?

Cheers,

George.
Re: object graphics tvrd problem.... [message #64431 is a reply to message #64430] Mon, 29 December 2008 11:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ghgm2008@gmail.com writes:

> I have an object graphics program and I want this to write a .png file
> every minute - via a screengrab.
> Under OSX this works fine - no problem... but on my main work machine
> (LINUX) it grabs the screen too literally
> - I get any windows in front - the screensaver - all sorts of stuff.
>
> How do I make sure that the screengrab just grabs the correct window ?

I would try showing the window before you take a snapshot
of it. Maybe even waiting a second or so to give the graphics
engine time to catch up:

info.Main_Window -> Show, 1
Wait, 0.75
info.Main_Window -> GetProperty, IMAGE_DATA=snapshot

Let me know if this works. :-)

Cheers,

David

P.S. I would have thought setting RETAIN=2 on your Widget_Draw
call would have solved the problem, though.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Map_Proj_Inverse Bug?
Next Topic: Yet Another Reason Not to Use MAP_SET

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:10:38 PDT 2025

Total time taken to generate the page: 0.00639 seconds