Jump to content

  • Log In with Google      Sign In   
  • Create Account

Understanding concept of creating resources in 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
5 replies to this topic

#1 BlackJoker   Members   -  Reputation: 556

Like
0Likes
Like

Posted 16 July 2014 - 05:18 AM

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?



Sponsor:

#2 AvengerDr   Members   -  Reputation: 751

Like
1Likes
Like

Posted 17 July 2014 - 04:39 AM

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

#3 BlackJoker   Members   -  Reputation: 556

Like
0Likes
Like

Posted 17 July 2014 - 08:42 AM

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



#4 BlackJoker   Members   -  Reputation: 556

Like
0Likes
Like

Posted 17 July 2014 - 03:17 PM

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?



#5 AvengerDr   Members   -  Reputation: 751

Like
1Likes
Like

Posted 18 July 2014 - 02:48 AM

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

#6 BlackJoker   Members   -  Reputation: 556

Like
0Likes
Like

Posted 01 August 2014 - 12:50 PM

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






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