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

Home » Public Forums » archive » Re: IDL 6.1.1 : how to activate opengl in hardware ?
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: IDL 6.1.1 : how to activate opengl in hardware ? [message #42348] Fri, 28 January 2005 10:05
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.1c63fce3a2851d259898f3@news.frii.com...
> =?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:
>
>> Ok, I think I understand... when you set RETAIN=2 in Widget_Draw(), then
>> it desactivate hardware rendering !!! With RETAIN=0, I must control the
>> drawing update, but hardware rendering is back ! Is it a bug, or I
>> misunderstood what RETAIN keyword means ?

RETAIN = 2 implies that IDL will try to repair damaged windows on its own
without expecting the application to redraw them. The beahvior you see is
not a bug. Read on for more details.

> I doubt hardware rendering is deactivated, but having IDL
> maintain backing store definitely means that IDL has to
> render each scene twice, once to the window and once to
> the restoring pixmap. No doubt it would be slower. And,
> depending upon how this is implemented, it may even be
> much slower.

What actually happens here on a Windows platform is that IDL passes a
Windows bitmap (DIB) to OpenGL and tells OpenGL to render into it (once)
instead of a window. OpenGL reverts to its software renderer to accomplish
this. Then the DIB is blitted to the window when it needs to be drawn or
when repairing window damage. Effectively, you end up with software
rendering.

In a way, the RENDERER property isn't described all that accurately. Rather
than the 0/1 values meaning hardware/software, it is a tiny bit more
accurate to say OpenGL/Mesa. The hardware/software meaning is a bit easier
for most people to understand and works most of the time, this situation
being one of the exceptions. Another exception can occur if you have a
really basic video card and the supplied OpenGL implementation ends up doing
everything in software.

I suppose another way to think of it is that RENDERER=0 means use hardware
acceleration whereever possible, and RENDERER=1 means always use the
standard, stable, and consistent software renderer.

If you have a nice graphics card, you're really shortchanging yourself if
you use only software rendering. The later nVidia and ATI cards run IDL
very well and the drivers are updated frequently. The frequent driver
updates *can* be a problem. For example, I updated my ATI drivers about a
month ago and that caused some IDL object graphics text to stop displaying.
I reverted back to the previous driver to recover. I then installed an
updated driver that came out soon after that , and everything looked good.
So, you do have to be a bit careful with drivers.

> In the early days, setting RETAIN=2 on an object graphics
> window caused an error. These days it is allowed, but still
> seems rather pointless, since you carry around the means
> to restore the window in your view anyway. No sense carrying
> it around twice! As a rule, I always set RETAIN=0 in all
> object graphics windows.

Yep!

Karl
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42353 is a reply to message #42348] Fri, 28 January 2005 06:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:

> Ok, I think I understand... when you set RETAIN=2 in Widget_Draw(), then
> it desactivate hardware rendering !!! With RETAIN=0, I must control the
> drawing update, but hardware rendering is back ! Is it a bug, or I
> misunderstood what RETAIN keyword means ?

I doubt hardware rendering is deactivated, but having IDL
maintain backing store definitely means that IDL has to
render each scene twice, once to the window and once to
the restoring pixmap. No doubt it would be slower. And,
depending upon how this is implemented, it may even be
much slower.

In the early days, setting RETAIN=2 on an object graphics
window caused an error. These days it is allowed, but still
seems rather pointless, since you carry around the means
to restore the window in your view anyway. No sense carrying
it around twice! As a rule, I always set RETAIN=0 in all
object graphics windows.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42354 is a reply to message #42353] Fri, 28 January 2005 06:26 Go to previous message
Jérôme Boivin is currently offline  Jérôme Boivin
Messages: 6
Registered: January 2005
Junior Member
Ok, I think I understand... when you set RETAIN=2 in Widget_Draw(), then
it desactivate hardware rendering !!! With RETAIN=0, I must control the
drawing update, but hardware rendering is back ! Is it a bug, or I
misunderstood what RETAIN keyword means ? Thanks for your help...
Regards,

J. Boivin
(For those who understand frenchies, http://jboivin.free.fr/visualisDicom/)

------------------------------------------------------------ ----------
Thanks for your answer. No, I have no dual screens, and I render
directly to an IDLgrWindow and not to an IDLgrBuffer. I will perform the
anti-aliasing test, and I'll see...

I'm using :
draw3dID = Widget_Draw(tab3DgaucheID, xsize=512, ysize=512, RENDERER=0,
GRAPHICS_LEVEL=2, /BUTTON_EVENTS, /MOTION_EVENTS, /EXPOSE_EVENTS, RETAIN=2)
and not directly an IDLgrWindow object, is there a difference ?

JB

Rick Towler a �crit :
> David Fanning wrote:
> :=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:
>
>>
>>
>>> ( I don't understand why IDL Virtual Machine doesn't activate
>>> hardware rendering...
>
>
> It does. You must have a problem with your configuration.
>
> Are you running dual monitors (some nVidia dual monitor configurations
> will not be accelerated on the secondary monitor)? You do know that
> volume rendering is not accelerated? You are rendering directly to an
> IDLgrWindow and not to a IDLgrBuffer and then to the window (IDL always
> renders to the buffer via software renderer)?
>
> You will always see your processor pegged at 100% as IDL is very
> processor bound in practice but this doesn't mean that it isn't
> rendering via openGL.
>
> A simple test would be to turn on your adapters anti-aliasing and render
> a simple IDLgrPolygon object using XOBJVIEW. Inspect the object for
> jaggies. Turn it off and perform the same test. If your adapter is
> working the difference between the two will be obvious. (you need to
> restart IDL after changing the AA state).
>
>
>> Probably because they would prefer to show off their software running
>> correctly (albeit slowly) rather than incorrectly (but fast). :-)
>
>
> David, I think you are living in the 90's. You're still not using that
> Quadro you bought 3 years ago are you???
>
> There are very few if any issues I have run into with hardware rendering
> in the past few years and recently I encountered the problem the other
> way around.
>
> And as for speed, unless you have a very unbalanced system you should
> always render faster with hardware rendering enabled. As an added
> bonus, image quality is often better since most modern graphics adapters
> perform anti-aliasing.
>
>
> -Rick
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42356 is a reply to message #42354] Fri, 28 January 2005 05:19 Go to previous message
Jérôme Boivin is currently offline  Jérôme Boivin
Messages: 6
Registered: January 2005
Junior Member
Thanks for your answer. No, I have no dual screens, and I render
directly to an IDLgrWindow and not to an IDLgrBuffer. I will perform the
anti-aliasing test, and I'll see...

I'm using :
draw3dID = Widget_Draw(tab3DgaucheID, xsize=512, ysize=512, RENDERER=0,
GRAPHICS_LEVEL=2, /BUTTON_EVENTS, /MOTION_EVENTS, /EXPOSE_EVENTS, RETAIN=2)
and not directly an IDLgrWindow object, is there a difference ?

JB

Rick Towler a �crit :
> David Fanning wrote:
> :=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:
>
>>
>>
>>> ( I don't understand why IDL Virtual Machine doesn't activate
>>> hardware rendering...
>
>
> It does. You must have a problem with your configuration.
>
> Are you running dual monitors (some nVidia dual monitor configurations
> will not be accelerated on the secondary monitor)? You do know that
> volume rendering is not accelerated? You are rendering directly to an
> IDLgrWindow and not to a IDLgrBuffer and then to the window (IDL always
> renders to the buffer via software renderer)?
>
> You will always see your processor pegged at 100% as IDL is very
> processor bound in practice but this doesn't mean that it isn't
> rendering via openGL.
>
> A simple test would be to turn on your adapters anti-aliasing and render
> a simple IDLgrPolygon object using XOBJVIEW. Inspect the object for
> jaggies. Turn it off and perform the same test. If your adapter is
> working the difference between the two will be obvious. (you need to
> restart IDL after changing the AA state).
>
>
>> Probably because they would prefer to show off their software running
>> correctly (albeit slowly) rather than incorrectly (but fast). :-)
>
>
> David, I think you are living in the 90's. You're still not using that
> Quadro you bought 3 years ago are you???
>
> There are very few if any issues I have run into with hardware rendering
> in the past few years and recently I encountered the problem the other
> way around.
>
> And as for speed, unless you have a very unbalanced system you should
> always render faster with hardware rendering enabled. As an added
> bonus, image quality is often better since most modern graphics adapters
> perform anti-aliasing.
>
>
> -Rick
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42361 is a reply to message #42356] Thu, 27 January 2005 22:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler writes:

> David, I think you are living in the 90's. You're still not using that
> Quadro you bought 3 years ago are you???

More like the 70's lately. My wife and I wanted to drink
a glass of wine and watch a romantic movie the other
night when the boys were gone, but neither one of us
could figure out how to work the damn TV. :-(

I'm thinking of becoming a Luddite.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42362 is a reply to message #42361] Thu, 27 January 2005 22:13 Go to previous message
netnews.comcast.net is currently offline  netnews.comcast.net
Messages: 10
Registered: October 2004
Junior Member
David Fanning wrote:
:=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:
>
>
>> ( I don't understand why IDL Virtual
>> Machine doesn't activate hardware rendering...

It does. You must have a problem with your configuration.

Are you running dual monitors (some nVidia dual monitor configurations
will not be accelerated on the secondary monitor)? You do know that
volume rendering is not accelerated? You are rendering directly to an
IDLgrWindow and not to a IDLgrBuffer and then to the window (IDL always
renders to the buffer via software renderer)?

You will always see your processor pegged at 100% as IDL is very
processor bound in practice but this doesn't mean that it isn't
rendering via openGL.

A simple test would be to turn on your adapters anti-aliasing and render
a simple IDLgrPolygon object using XOBJVIEW. Inspect the object for
jaggies. Turn it off and perform the same test. If your adapter is
working the difference between the two will be obvious. (you need to
restart IDL after changing the AA state).


> Probably because they would prefer to show off their software
> running correctly (albeit slowly) rather than incorrectly (but fast).
> :-)

David, I think you are living in the 90's. You're still not using that
Quadro you bought 3 years ago are you???

There are very few if any issues I have run into with hardware rendering
in the past few years and recently I encountered the problem the other
way around.

And as for speed, unless you have a very unbalanced system you should
always render faster with hardware rendering enabled. As an added
bonus, image quality is often better since most modern graphics adapters
perform anti-aliasing.


-Rick
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42371 is a reply to message #42362] Thu, 27 January 2005 13:06 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:

> ( I don't understand why IDL Virtual
> Machine doesn't activate hardware rendering...

Probably because they would prefer to show off their software
running correctly (albeit slowly) rather than incorrectly (but fast).
:-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42374 is a reply to message #42371] Thu, 27 January 2005 12:52 Go to previous message
Jérôme Boivin is currently offline  Jérôme Boivin
Messages: 6
Registered: January 2005
Junior Member
Thank you for your answer, but I had already done that
(File->Preferences and RENDERER=0), and if I move (with Trackball
object) my 3D model, it's as slow as if I put RENDERER=1, and my CPU
works 100%, so I think it's Mesa3D which works ! My video card is a
Nvidia Geforce FX 5700, and others win32 openGL applications works fine.
So it's not a driver pb... :( I don't understand why IDL Virtual
Machine doesn't activate hardware rendering...


David Fanning a �crit :
> =?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:
>
>
>> Is there someone who can tell me how to activate hardware rendering in
>> OpenGL with IDL ? Whatever I set RENDERER=0 or RENDERER=1, it seems to
>> be always the software renderer that is used (it's so slow !). Is there
>> something to activate, or a dll to install ? Please help me !
>>
>> JB
>>
>> PS : I'm using IDL on Windows plateform...
>
>
> As it happens, the software renderer, for some things,
> is even *faster* than hardware rendering!
>
> There are a couple of places to turn hardware rendering
> on. The default setting is under File->Preferences menu
> on the IDLDE. Choose the Graphics tab and select hardware
> rendering. Remember you set it though, because when things
> start going south on you, that is the first place to look
> for the problem. :-)
>
> Then, rendering options can be set at the IDLgrWindow
> level (draw widgets, too). Be sure all these options
> are set to hardware rendering (RENDERER=0).
>
> Once you have done all that, just hope and pray
> everyone who runs your software will have decent
> graphics cards, or you will be running down problems
> *forever*. :-)
>
> Cheers,
>
> David
>
Re: IDL 6.1.1 : how to activate opengl in hardware ? [message #42377 is a reply to message #42374] Thu, 27 January 2005 10:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
=?ISO-8859-1?Q?J=E9r=F4me_Boivin?= writes:

> Is there someone who can tell me how to activate hardware rendering in
> OpenGL with IDL ? Whatever I set RENDERER=0 or RENDERER=1, it seems to
> be always the software renderer that is used (it's so slow !). Is there
> something to activate, or a dll to install ? Please help me !
>
> JB
>
> PS : I'm using IDL on Windows plateform...

As it happens, the software renderer, for some things,
is even *faster* than hardware rendering!

There are a couple of places to turn hardware rendering
on. The default setting is under File->Preferences menu
on the IDLDE. Choose the Graphics tab and select hardware
rendering. Remember you set it though, because when things
start going south on you, that is the first place to look
for the problem. :-)

Then, rendering options can be set at the IDLgrWindow
level (draw widgets, too). Be sure all these options
are set to hardware rendering (RENDERER=0).

Once you have done all that, just hope and pray
everyone who runs your software will have decent
graphics cards, or you will be running down problems
*forever*. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to extract a datarange from a multidimensional array?
Next Topic: voxel_proj and array type

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

Current Time: Thu Oct 09 21:26:30 PDT 2025

Total time taken to generate the page: 1.03860 seconds