Sign in to follow this  
Followers 0
thomasvantroyen

Why use DataStream?

1 post in this topic

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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0