Usind d3d with L16 format and without window

Started by
0 comments, last by Nik02 18 years, 8 months ago
Hi, I'm going to try to explain as better I can whats the problem that exactly I have. I want to use a graphic card to a biomedical image processing application. I want to take profit of the performance operating with images. But for the moment I only want to simulate...not really implement into my graphic card, so I use Devyce REF. I thought that if you use this kind of device, I don't have to be worry about if backbuffer really suports my formats, I I thouthg in any case, for create render target, i should not have any problem if I create like R5B6G5 or L16, neither using HAL or REF. CAn you confirm that? My purpose is not to appear the transoformations on the screen. Is to get the data like "values of pixels" in a matrix, so I 'm not going never to render into the screen. In the simple program I develop I have two problems. One is creating my device. I would like not have to create a window, but when I put null in the window parameter of D3DPresentParametes, my program fails creating the device. And second, I would like to be able to get my data from my rendertarget, in L16 or L8. So I would like to be able to create a RenderTarget, first as Devyce Ref, to know if my program works, and after, I will buy a graphic card compatible with my program. The problem is that my program works when I create it as R5G6B5 but it fails (in creating render instruction)as soon as i change to L16, using both HAL and REF. After my program changes the render target from my backbuffer to my render targer, I render, after I block, and I get the data...! But this fdata is going to appear in R5G6B5, i f i'm not able to create the render target as L16... Can you told me whats wrong exactly to try to understand what's going on, and what knowledge I have is not true. Thanks, Jesus
Advertisement
1: The D3D device object requires a valid window for it's internal operations. You can create a dummy window if you do not want to use your app's main one, but you do need a window of some sort.

2: The reference device has some limitations, like real 3d accelerators, because it's programmers couldn't have implemented all the possible combinations of modes the user might want to use.

While the reference device only supports 4 back buffer modes, it is much more flexible in render target modes. As L16 still isn't among these, I recommend using G16R16 and discarding each other word if you strictly need 16-bit integer target. G16R16 is, as far as I know, quite well supported in modern hardware also.

As a side note: I assume that in biomedical application, you might want to use R32F for maximum fidelity, unless your application specifically has to process 16-bit data.

Finally, you can use the CapsViewer application, included in the SDK, to easily determine what capabilities the reference device actually supports.

Niko Suni

This topic is closed to new replies.

Advertisement