Open andrekoehler opened 7 years ago
@andrekoehler as far as I remember Multisampling doesn't work when ExternalWindow is used (WinForms, Wpf, etc). Probably
viewport.RenderPath.Append(CoreAssets.PostProcess.FXAA2);
(or FXAA3) will be enough for you.
I built the debug version of Urho3D and UrhoSharp and found out, that the line "SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, multiSample);" in OGLGraphics.cpp with multiSample = 8 is definitely called, but the call has no effect for some reason.
I built the Direct3D11 backend version of mono-urho.dll (instead of the OpenGL backend that is shipped on NuGet) and multisampling now works correctly within Windows Forms.
Ok, I'll take a look. The sources you attached use DX or Opengl?
Oops, it turns out D3D9 is the default for the native Urho3D library when compiling from Windows, so the screenshot I posted was created using the D3D9 backend. I recompiled the native Urho3D library with the "-DURHO3D_OPENGL=1" build option and it has the same issues as the UrhoSharp nuget package: aliasing even tough multisampling is set to 8.
as far as I remember Multisampling doesn't work when ExternalWindow is used (WinForms, Wpf, etc). Probably
It is possible to make a game with Xamarin (UI) + UrhoSharp will only without smoothing?
I found out that this bug is fixed in SDL 2.0.7 and 2.0.8. UrhoSharp currently uses SDL 2.0.5. I created a native Win32 Window test project to compare both versions to find that out. The bug might already been fixed in 2.0.6 but I did not check it. So in order to fix this bug, please update libSDL to >= 2.0.7. Maybe it helps that Urho3D native is currently at 2.0.7 as well: https://github.com/urho3d/Urho3D/blob/master/Source/ThirdParty/SDL/WhatsNew.txt
SDL 2.0.5
SDL 2.0.7 and SDL 2.0.8
Here is my test project: WindowsProject1.zip
Keep in mind that you can not use a vanilla libSDL version for this test project but need a patch in order for SDL to initialize OpenGL when using SDL_CreateWindowFrom instead of SDL_CreateWindow. This patch is already included in Urho's version of libSDL:
I slightly modified "Urho.Samples.Console" and "Urho.Samples.WinForms" so that the ApplicationOptions contain the setting "Multisampling = 8".
In "Urho.Samples.Console" it is correctly applied to the example games, but in "Urho.Samples.WinForms" it seems to be ignored because I can clearly see aliasing on edges. (Tested with 04_StaticScene)