LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the 3d picture control be double buffered or vertically synchronised to the monitor?

Hi,

I'm doing some work involving the use of the new 3D picture control in Labview 8.2. I'd like to know if it's possible to buffer or vertically sync the refresh of the 3d picture control to the monitor to prevent tearing artifacts? I'm using the dedicated rendering window to make use of hardware acceleration for the display. I've looked at polling the DIRECTLib.I_dxj_DirectDraw control for the vertical blank status or scanlines but don't really want the CPU overhead that this would incur.

Any ideas much appreciated!

Pete
0 Kudos
Message 1 of 9
(3,217 Views)

Hi Pete,

I have had a look into this for you, and from what I've found, it seems that the method you have already mentioned using the DirectDraw control, is the only way of reducing the rendering artifacts with the 3D picture controls.

Regards,

Daniel

0 Kudos
Message 2 of 9
(3,189 Views)
Thanks for your help Daniel, much appreciated.

I wondered if that might be the case. After another look myself it seems the directdraw control has a callback function waitForVerticalBlank but so far I haven't been able to get it to work. However, presumably this would remove the need for polling and reduce cpu load?

Pete
0 Kudos
Message 3 of 9
(3,185 Views)
Yes, that should reduce the CPU load.
0 Kudos
Message 4 of 9
(3,182 Views)
Ok - success of sorts. I wasn't writing the correct flag to the waitForVerticalBlank function. To make it wait and return when a blank is occurring you need to wire a 1, as in the attached vi. The only thing is, system monitor shows the CPU still getting highly loaded during this test. Strange, am I missing something?

Pete


0 Kudos
Message 5 of 9
(3,180 Views)
Hi,

I was wondering if you could tell me which Type Library you are using for the DirectDraw control, as I am currently getting errors when I try to run, as I think I have the wrong library selected.

Regards,

Daniel
0 Kudos
Message 6 of 9
(3,159 Views)
Hi,

The library is Direct 1.0 and then I_dxj_DirectDraw in the selection box. However, I checked this on a second PC and it doesn't have the library, despite Direct X 7 and 8 being present. It may require installing a DirectX library of some kind I guess, but it seems strange this kind of functionality isn't present out of the box.

Will investigate further,

Cheers,

Pete
0 Kudos
Message 7 of 9
(3,148 Views)
Has anyone had any experience with DirectX10 / Windows Vista?  I have no experience with Active X in older versions either, but am trying to reproduce the work you all have shown and am having trouble.

I'm not seeing Type libraries with names similar to Direct1.0

I do see:
Microsoft DirectX Transforms Core Type Library Version 1.1  -- some of these look promising
Microsoft DirectX Transforms Image Transforms Type Library Version 1.1  -- which looks like a bunch of image filters, probably not useful

Any help or pointers towards good references is apreciated.
--Alex.
0 Kudos
Message 8 of 9
(2,955 Views)

When I run this labVIEW8.61 vi on my notebook, getverticalblank status seems to miss occurences whereas getscanline performs just fine.

 

Does anyone have any ideas on how to improve the performance of getverticalblank?

 

Thanks,

Rob

0 Kudos
Message 9 of 9
(2,635 Views)