direct3d resource sharing

Started by
3 comments, last by Shnoutz 22 years ago
I have this simple problem : I''m making a 3d editor and I have 4 distinct d3d window (one for each view), I would like to know if it is possible to share the resources across multiple devices ?(like vertex buffers, textures, etc...) Thank you.
Advertisement
I''d say no, as each of those requires a device pointer to be created in the first place. However, I believe you can use several viewports and one device to render all of your views.
---visit #directxdev on afternet <- not just for directx, despite the name
Yep I tought about that. but, you know, it would be great having multiples child windows all with differrent render states and all sharinfg their resources... I think that might be a great improvement that microsoft could do in their next implementation. But I''m dreaming.

But if anyone as a solution dont be shy.

DON''T USE MULTIPLE DEVICES.
devices are optimised for only one existing at any time.

look at using and additional swapchain for each window:

from the SDK:

Presenting Multiple Views in Windowed Mode
In addition to the swap chain that is owned and manipulated through the IDirect3DDevice8 interface, an application can create additional swap chains in order to present multiple views from the same device. The application typically creates one swap chain per view by using the IDirect3DDevice8::CreateAdditionalSwapChain method, and associates each swap chain with a particular window. The application renders images into the back buffers of each swap chain, and then presents them individually.

Only one swap chain at a time can be full-screen on each adapter.

there are tutorials on this as well. (sorry no links)

this should solve your original problem.
gotta go

later
Thank you, that solve my problem completly.

This topic is closed to new replies.

Advertisement