-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when resizing window #31
Comments
use ComObject new device |
For reference by those who come after us: I had the same issue but for me creating a new device was not an option*, nor was it necessary... In my case the error was allowing the IDXGIDevice1 I used to create my swap chain to get cleaned by the garbage collector so all I had to do was hold a reference to it. Something like the following code works just fine:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all I am using this library very gratefully.
I am testing directx using winui3 swapchain.
However, when resizing the window, Device.CreateRenderTargetView throws an error. [COM object that has been separated from its underlying RCW cannot be used.
]
I don't understand this error, so I can't fix it.
please help ........
public void Resize(uint width, uint height)
{
mDeviceContext.Object.OMSetRenderTargets(0, null, null);
mDeviceContext.Object.Flush();
mRenderTargetView.Dispose();
mRenderTargetView = null;
...
}
The text was updated successfully, but these errors were encountered: