Jump to content
  • Advertisement
Sign in to follow this  
thomasvantroyen

Why use DataStream?

This topic is 2502 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!