Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Cleanup for DPI awareness improvement #291

Merged
merged 6 commits into from Feb 26, 2014

Conversation

TheWhiteAmbit
Copy link
Contributor

No description provided.

{
// Creates a SwapChain from a CoreWindow pointer
using (var comWindow = new ComObject(window))
return new SwapChain1(factory, device, comWindow, ref desc);
return new SwapChain2(new SwapChain1(factory, device, comWindow, ref desc).NativePointer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is invalid (even if it can work). You need to create a SwapChain1 and then QueryInterface<SwapChain2>() from it, like this:

using (var swapChain = new SwapChain1(factory, device, comWindow, ref desc))
   return swapChain.QueryInterface<SwapChain2>();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you I will change it. It occurred a few times.

@TheWhiteAmbit
Copy link
Contributor Author

I think this is ready.

@xoofx xoofx merged commit c7fd5ab into sharpdx:master_integration Feb 26, 2014
@TheWhiteAmbit TheWhiteAmbit deleted the master_integration branch February 28, 2014 00:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants