Advertisement Jump to content
Sign in to follow this  
NathanRidley

SharpDX - SwapChain1 - where are the constructors?

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

I'm currently going through Direct3D Rendering Cookbook, 2nd Edition and in the first chapter it's constructing an instance of SharpDX.DXGI.SwapChain1 and providing a number of parameters, as per the SharpDX source code here. Now, I've installed the latest from the SharpDX website, and am referencing the assemblies in the DirectX11_1-net40 folder, and I'm also running on Windows 8.1 with DirectX 11.2 (which my video card supports), and yet in my code, the only exposed constructor I have access to is SwapChain1(IntPtr nativePtr). There is absolutely no sign of the constructors I linked above in the SharpDX source on Github.

 

Any idea what I might be doing wrong?

 

Screenshot of the code from my Kindle Reader:

2014-02-22_1256.png

 

Screenshot of me not being able to write the above code on my machine:

 

2014-02-22_1259.png

Edited by axefrog

Share this post


Link to post
Share on other sites
Advertisement

Well I have my answer. The folks at SharpDX actually haven't updated the main download for a while. I need the DirectX11_2 build of SharpDX, which I kind of have to do myself, it seems.

Share this post


Link to post
Share on other sites

Using the latest dev package 2.5.1 from the home page, this should be in the folder DirectX11_2-net40 and constructors are available from the DXGI assembly there.

[Edit] You don't need to build yourself, there is a build 2.5.1 package build updated to the latest changes[/Edit]

Edited by xoofx

Share this post


Link to post
Share on other sites

Well I have my answer. The folks at SharpDX actually haven't updated the main download for a while. I need the DirectX11_2 build of SharpDX, which I kind of have to do myself, it seems.

 

Make sure to use the "Latest Dev Package" download link on the SharpDX homepage. It includes the binaries for 11_2.

Edit: Xoofx was faster smile.png

Share this post


Link to post
Share on other sites

Using the latest dev package 2.5.1 from the home page, this should be in the folder DirectX11_2-net40 and constructors are available from the DXGI assembly there.

[Edit] You don't need to build yourself, there is a build 2.5.1 package build updated to the latest changes[/Edit]

 

Ahah, thanks, I couldn't get anything to build anyway. Loading the SharpDX solution into Visual Studio 2013 had a tonne of errors. References to methods, identifiers and so forth that did not exist anywhere in the entire code SharpDX base.

Share this post


Link to post
Share on other sites

 

Ahah, thanks, I couldn't get anything to build anyway. Loading the SharpDX solution into Visual Studio 2013 had a tonne of errors. References to methods, identifiers and so forth that did not exist anywhere in the entire code SharpDX base.

 

Compiling SharpDX requires to install prerequisites (as described on the download page: Windows SDK7.1 even for Windows8, DirectX June SDK 2010, Net20/Net35 on Windows8) and select the correct solution target platform (DirectX11_2Debug) when building

Share this post


Link to post
Share on other sites

I know you already have this sorted axefrog, but for others following this the dev package xoofx refers to is included in the code download for the book as well under the folder .\External\Bin

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!