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
WindowSize should be allowed to be zero #3
Comments
Very good point. I have just tested with OpenGL too and it does not seem to pose an issue (the bars just disappear until a new size is given, so I suppose it releases some resources too). I see no problem with allowing a size of (0, 0). How about this:
So that (0, 0) is accepted to allow releasing ATB resources but invalid sizes like (0, 100) or (50, 0) are rejected. (I try to do as much error checking as I can on the C# side because the results of some AntTweakBar calls with invalid parameters can be quite unpredictable). If it works properly it might also be worth adding a |
Since there is no event like OnDeviceLost and OnDeviceReset for device itself in SlimDX.Those events are indirectly handled by the device's host Control events like Resize and OnSizeChanged(or some others?).It will be nice to have a |
How would the Or do you mean aliasing |
|
If I understand correctly the As we have seen the |
How's that? |
Your understand is OK.In practice, |
I believe device lost/reset is exclusive to D3D9 (it has been removed in D3D10+, and I don't know anything similar in OpenGL). That said I gave the methods generic enough names to be possibly useful with any graphics API. Let me know if there is anything missing or that could be improved. |
In
Library\Native.cs
file ,there is aWindowSize
method:According to this page,when dealing with
With DXUT (DirectX SDK)
,callTwWindowSize(0, 0)
will make the device to release resouces.That is exactly what I want when handling OnDeviceLost event.If zero is not allowed,resource management cannot be handled in another way as far as I know,resize operation will make the app crash.I have test in my SlimDX based app,it worked.Just a bug report.
The text was updated successfully, but these errors were encountered: