microsoft / angle

ANGLE: OpenGL ES to DirectX translation
Other
615 stars 166 forks source link

ANGLE.WindowsStore, WinUI 3 Preview 1 and SwapChainPanel #170

Closed hatharry closed 3 years ago

hatharry commented 4 years ago

I'm trying to use ANGLE.WindowsStore and SwapChainPanel in WinUI 3, this is the function I'm using:

public EGLSurface CreateSurface(SwapChainPanel panel) { if (panel == null) { throw new ArgumentNullException("SwapChainPanel parameter is invalid"); } EGLSurface surface = EGL_NO_SURFACE; int[] surfaceAttributes = { EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER, EGL_TRUE, EGL_NONE }; PropertySet surfaceCreationProperties = new PropertySet(); surfaceCreationProperties.Add("EGLNativeWindowTypeProperty", panel); surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, surfaceCreationProperties, surfaceAttributes); if (surface == EGL_NO_SURFACE) { throw new Exception("Failed to create EGL surface"); <--- ERRORS HERE } return surface; }

Using a Universal Windows app the function works fine, but moving to WinUI 3 it fails to create a EGL surface.

hummeleBop commented 3 years ago

I have the same issue with the last WinUI 3 Preview 3. Is angle for UWP compatible with WinUI 3 ?

austinkinross commented 3 years ago

Hi there, this repository is inactive because all changes in it have been submitted to Google's master ANGLE branch. Going forward, we recommend that ANGLE users download and use the master version of ANGLE instead of this repository's version or the NuGet package. The master version of ANGLE contains many years of updates that aren't in the NuGet package.

Regarding WinUI support specifically, I recommend having a conversation about this on the master ANGLE repository's forums, such as here: https://groups.google.com/g/angleproject/c/oq7JU0StLCs/m/j7sxxTnvAQAJ