Understanding concept of creating resources in SharpDX

Started by
4 comments, last by BlackJoker 9 years, 8 months ago

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?

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.

--Avengers UTD Chronicles - My game development blog

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

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?

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.

--Avengers UTD Chronicles - My game development blog

Thanks for answer. After your explanations this framework becomes more clear.

This topic is closed to new replies.

Advertisement