Skip to content

please provide examples of using DirectX and SwapChainPanel in c++/Winrt for desktop app. #3264

Answered by ifgotmoney
ifgotmoney asked this question in Q&A
Discussion options

You must be logged in to vote

thank you all very much

here just close this thread.

include "winrt/Windows.System.Threading.h" makes the threadpool class works for desktop APP.
the example code doesn't have this header file included in pch.h, but in WinUI3 for desktop we need to manually include this header file.

one more thing may be helpful to others
I found this article from microsoft regarding Asynchrony, and interop between C++/WinRT and C++/CX, it provided a way to make this pointer always alive by Derive LowLatencyInputMain from public winrt::implements<LowLatencyInputMain, winrt::Windows::Foundation::IInspectable>, and then use [this, self=get_strong] in the capture list to make everything working. by this meth…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@DarranRowe
Comment options

@castorix
Comment options

Comment options

You must be logged in to vote
4 replies
@DarranRowe
Comment options

@ifgotmoney
Comment options

@DarranRowe
Comment options

@ifgotmoney
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ifgotmoney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants