Jump to content
  • Advertisement
Sign in to follow this  
BlackJoker

Understanding concept of creating resources in SharpDX

This topic is 1451 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

Help me please to understand SharpDX concept how created instances of different object like RenderTargetView, DepthStencilView and other?

In input parameters in constructor there are device and Resouse except descriptions.
 

Which device I must transmit to constaructor if there is no device? GraphicsDevice doesn`t contain device type. Need I create new device for this? If so, then why? I thought that graphics device manager already contains that device.
 

Also what is Resourse here? What I must transmit as a parameter?
 

Could you please help me to understand this concept?

Share this post


Link to post
Share on other sites
Advertisement

What are you trying to do?

SharpDX's GraphicsDevice class in the toolkit can be implicitly passed as parameter to any method accepting a Direct3D11.Device. They have implemented an "implicit (conversion) operator" that automatically returns the underlying native device.

Share this post


Link to post
Share on other sites

Heh....

I already found that fact after I found one tutorial, but i didnt know earlier that it can be converted to D3D11 device and device context. I expected to see corresponding properties...

Share this post


Link to post
Share on other sites

I want to know one more question:

constructors of RenderTargetView and DepthStencilView contains Resouce parameter. What is it? Which value I must transmit as parameter there?

Does anyone know?

Share this post


Link to post
Share on other sites

RenderTarget/DepthStencil View are classes that provide access to an underlying RenderTarget/DepthStencilBuffer resource. In order to create them you need to pass the correct resource. For example, a rtv is usually created for the BackBuffer texture, while the dsv is created for a DepthStencilBuffer object.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!