• Advertisement
Sign in to follow this  

Why use DataStream?

This topic is 2176 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey,

more curiosity than necessity (i like understanding things to the bone :) )

Why does SlimDX use a DataStream to work with DirectX Buffers? I have a feeling it has something to do with unmanaged array's being different than managed arrays but why isn't it abstracted away into the framework, if it's only that?

greetings.

Share this post


Link to post
Share on other sites
Advertisement
DataStream implements the Stream abstraction on top of unmanaged memory pointers. That makes it much easier to read and write data from them, otherwise you would have to use fairly low level constructs and possibly unmanaged code to interact with buffers of all sorts. It also allows us to safely round-trip native memory buffers to user code and back into SlimDX, which is used to accelerate some operations.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement