Texture as Raw in dx11 and the oposite

Is there a way to convert dx11 textures to Raw or to String or even to Value so that they can be queued as data (and not as images) ? Any suggestion (In dx9 I am using AsRaw(Texture) -> AsString -> Queue -> ASraw -> Dynamic Texture(raw)).

It would be also fine for me to convert dx11 Texture to dx9 (but I think that this is not possible).


dx11 to dx9 is possible in next build (actually it works in current, but there was a small bug with renderer (temptarget), so it was a bit unpredictable. In next release (eg: next beta) it’s sorted tho.

Doing :
AsRaw(Texture) -> AsString -> Queue -> ASraw -> Dynamic Texture(raw)

is rather inefficient, since technically you just patch a Queue (Texture), with the issue that you do 4 memory copy and create 2 stalls. I’d need explanation on usefulness ;)

Converting texture to Raw is pretty easy, If you look at:

It explains how to do it (here i convert to value after, but you could output the stream directly).

You are right vux, I ll check it asap !

and… Thank you ;) !

Finally it didnt work for me (I am missing something - probably the IO.Pointers lib), so I read once again what you wrote and checked if I was missing some other point, in any case I will put it again and I ll make it clear (just to be sure that I explained it well the first time).
In dx9 I was taking the render output, DxTexture converting it into raw data AsRaw(ex9.Texture) and then for the purpose of queuing it I had to convert it into a string AsString(raw) and finaly put it in a Queue(string). In that way I was storing a short animation (some thousand frames) in my “buffer” (Queue) and reading it again at my will, simultaneously or separately in the same or in a different patch (ie: via S)).
I am pretty sure that my inability to realise your solution is my difficulty to understand deeper dx11 and its buffer’s system. (What am I doing here ? :P )
So I ll be glad if I had a short example (converting dx11 textures to raw or other queue-able data and vice-versa) or a quick guide on dx11 buffers (both would be as good as it gets).

Thanks in advance