Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Marshalling C# structures into Direct3D 11 cbuffers using SharpDX


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 juhav81   Members   -  Reputation: 100

Like
0Likes
Like

Posted 30 March 2012 - 01:38 AM

I'm looking for a good way to update shader cbuffers from C# (using D3D10 and SharpDX). I found an interesting blog post and I have some questions about the ConstantBuffer class that was introduced in the blog:

http://timjones.tw/blog/archive/2011/03/08/marshalling-c-structures-into-directd--cbuffers-using

1. Is this going to work with D3D10 also?
2. Is it possible to avoid DataBox creation every time UpdateValue is called?
3. Would it be better to put the actual struct (T) inside the class as a public field instead of passing it as a parameter in UpdateValue method?

Sponsor:

#2 juhav81   Members   -  Reputation: 100

Like
0Likes
Like

Posted 02 April 2012 - 02:03 AM

After some digging and testing:

1. Yes.
2. Yes.
3. That's one way to do it.




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