EFileTahi-A Posted June 8, 2005 Posted June 8, 2005 (edited) I need to change the DirectX.Device of some Texture, how can I do this? The Texture.Device is read only... Edited June 8, 2005 by EFileTahi-A Quote
Machaira Posted June 8, 2005 Posted June 8, 2005 Why do you need to change the device? Quote Here's what I'm up to.
Leaders snarfblam Posted June 8, 2005 Leaders Posted June 8, 2005 I doubt that you can change the device. I'm just guessing here, but I would think that once you create the texture, it is tied to a physical device (represented by the device class) which cannot be changed, and which is why the device must be passed to the constructor. Quote [sIGPIC]e[/sIGPIC]
EFileTahi-A Posted June 8, 2005 Author Posted June 8, 2005 (edited) Why do you need to change the device? So that I can use the same texture into several DXDevices instead of loading the same picture n times for n devices and wasting precious resources with repetive objects... Alternatively, is it possible to extract ONLY the picture loaded into a texture and pass it to another texture? Edited June 8, 2005 by EFileTahi-A Quote
IngisKahn Posted June 8, 2005 Posted June 8, 2005 "n devices"? What exactly are you doing? Quote "Who is John Galt?"
EFileTahi-A Posted June 10, 2005 Author Posted June 10, 2005 (edited) Device 1: Controls the map graphics Device 2: Shows the seletected picture to add in the map Device 3: Desplays all the available graphics to choose from http://img.photobucket.com/albums/v698/EFileTahi-A/Devices.jpg Too make all working as shown on the screenshot I'm loading the graphics 3 times! If I could just change the device associated to the texture I would only need to load them once... Edited June 10, 2005 by EFileTahi-A Quote
Machaira Posted June 10, 2005 Posted June 10, 2005 You might be able to get away with not using DirectX for what you're showing with the 2nd and 3rd devices. Quote Here's what I'm up to.
EFileTahi-A Posted June 10, 2005 Author Posted June 10, 2005 You might be able to get away with not using DirectX for what you're showing with the 2nd and 3rd devices. Well, both 2nd and 3rd devices were implanted with DX because the old way I had (which was not using DX at all) had some problems with transparent pictures. There transparent pixels become full of artifacts like in this pic: http://img.photobucket.com/albums/v698/EFileTahi-A/GraghicsV2.jpg See the strange numbers on the available graphical buttons? Those numbers appear precisely on the transparent pixels of each tile (don't ask me why), yet, most of those tiles are displaying 100% unaccurate images... They are a total mess. What they should display is precisely what is displayed in my previous post... So, I was forced to use DX in order to kill this stupid issue... Quote
DrunkenHyena Posted June 20, 2005 Posted June 20, 2005 A texture cannot be moved like that from device to device. If you want to "copy" a texture to another device you'll have to copy the bits to a system memory chunk and then copy that to the other texture. This also means that if you load the same texture in those 3 devices you will have 3 copies of that texture in video memory. Multiple devices are bad. You would be better off creating multiple swap chains (essentially multiple unrelated backbuffers) and just using one device. Quote
EFileTahi-A Posted June 21, 2005 Author Posted June 21, 2005 (...) Multiple devices are bad. You would be better off creating multiple swap chains (essentially multiple unrelated backbuffers) and just using one device. What do mean by this? Quote
DrunkenHyena Posted June 23, 2005 Posted June 23, 2005 What do mean by this? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_m/directx/ref/ns/microsoft.directx.direct3d/c/swapchain/swapchain.asp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.