Jump to content

  • Log In with Google      Sign In   
  • Create Account

Why use DataStream?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 thomasvt   Members   -  Reputation: 109

Like
0Likes
Like

Posted 16 January 2012 - 12:29 PM

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.

Sponsor:

#2 Promit   Moderators   -  Reputation: 7676

Like
0Likes
Like

Posted 04 February 2012 - 04:59 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS