Sharing texture

deepavs

Newcomer
Hi,

I have to share texture between applications. Here i create a texture using GetSurfaceLevel() and SetRenderTarget() with my drawings. And i have to use this texture in another application. Is this possible?:cry:
 
Not with D3D 9 and AFAIK there is no OpenGL Extension available for this. D3D 9L will support the sharing of resources.

Can you give us a little bit more information about your use ase. Maybe there is an other solution.
 
I am using DirectX9b. In my application there will be many modules which will modify this texture. So i think i have to use shared memory to store this texture.:D About OpenGL i read about shared resources between processes.Any thing like that in Directx:?:
 
Why don’t load all your modules that modify your textures in the same process? Than you will have no problem to share the textureobjects.
 
deepavs said:
Ya..i just want to know whether any resource sharing in directx...any useful links plzzzz

Direct3D does not support using a resource from a different process. Inside the same process you can use the resource objects everywhere.

The first Direct3D version that will support resource sharing between different processes will be D3D9L. But you will need Windows Vista and a new driver to use D3D9L.
 
ss. I think i have to drop the different application concept. Thank you for the help and will be back soon with other thread. :LOL:
 
deepavs said:
Hi,

I have to share texture between applications. Here i create a texture using GetSurfaceLevel() and SetRenderTarget() with my drawings. And i have to use this texture in another application. Is this possible?:cry:
So basically, you're after the equivalent of an operating system's shared library/ dll for textures?
 
Microsoft did take this need into account with DX9, including HANDLE* pSharedHandle as a parameter in the likes of CreateTexture. However this parameter has always been documented as 'Reserved. Set this parameter to NULL.'.

I'm afraid you're going to have to maintain two copies of your resources & update changes between them yourself.

GP.
 
Genghis Presley said:
Microsoft did take this need into account with DX9, including HANDLE* pSharedHandle as a parameter in the likes of CreateTexture. However this parameter has always been documented as 'Reserved. Set this parameter to NULL.'.
GP.

It will work with DX9.0L as there this parameter is not longer "Reserved".
 
Demirug said:
It will work with DX9.0L as there this parameter is not longer "Reserved".
Yes. I was just searching for somewhere MS had spoken about it publically so that I could comment. According to the presentation given by Rudolph Balaz at PDC (available at http://msdn.microsoft.com/directx/) the resources must be created in system memory to be shareable which reduces the utility somewhat.

GP.
 
Genghis Presley said:
Yes. I was just searching for somewhere MS had spoken about it publically so that I could comment. According to the presentation given by Rudolph Balaz at PDC (available at http://msdn.microsoft.com/directx/) the resources must be created in system memory to be shareable which reduces the utility somewhat.

GP.

A shared resource must be created in the defaul pool.

You refer to the second use case for the pSharedHandle parameter. In the case of system memory resource you can use it to give D3D a block of memory you have already allocated.
 
Demirug said:
A shared resource must be created in the defaul pool.

You refer to the second use case for the pSharedHandle parameter. In the case of system memory resource you can use it to give D3D a block of memory you have already allocated.
Yes, you're right. I should remember to double check any posts I make once the Friday afternoon malaise has set in. ;)

GP.
 
You could always create an intermediate layer that handles all Direct3D calls for all of your apps.
 
Back
Top