-
Notifications
You must be signed in to change notification settings - Fork 162
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
Implemented a RAII wrapper over IUnknown, for Direct3D #2353
Implemented a RAII wrapper over IUnknown, for Direct3D #2353
Conversation
I think the code for IUnknownPtr needs to be wrapped in a |
It has zero dependency on windows headers, and may work with anything that has AddRef/Release methods. But I have second thoughts about this approach, will revise this later. |
Hmm, maybe this is still a not so bad approach. I still need to reorganize this a bit, and I found there's some bug, occuring when resizing a window (but strangely, not when changing from windowed to fullscreen). I will have to carefully recheck all usages of the new ptr type. EDIT: since I'm at this, i might also check out why there's constantly a warning about 1 remaining reference to IDirect3D on exit. |
ef9b704
to
cd5adb8
Compare
I threw a bunch of games on this and they all seem to work. Small things in
Right, I do still get the The CirrusCI failure just looks like a temporary network bug in their end... Rerunning it should work. |
Oh, I meant just replacing. The It can be left there too if it makes things clearer. Edit: actually perhaps it's better to leave it there, not sure how different compilers see this. I only tested with MSVC. :/ |
cd5adb8
to
2ad5b43
Compare
Resolves #2343.
An automatically releasing pointer for IDirect3D objects.