-
Notifications
You must be signed in to change notification settings - Fork 166
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
UWP + WebGL + Chakra request #86
Comments
Hi there, Internet Explorer and Microsoft Edge use their own WebGL->D3D11 translation layer for WebGL content. Creating a WebGLRenderingContext in your Javascript (or C#) UWP application will therefore use the Edge team's translation layer rather than ANGLE. It may be possible for you to write your own wrapper for ANGLE in Javascript or C# but that would be a lot of effort. |
FYI this is what I'm working on @JimSEOW - if you'd like to work on it with me I could certainly use some help. The WebGL translation layer still needs to be written in C#. There's a good example of a WebGL implementation here (though it's in Objective C): https://github.com/phoboslab/Ejecta/tree/master/Source/Ejecta/EJCanvas/WebGL Are you interested in contributing to this project? |
Taken from ChakraBridge: Why not use a Webview? Memory footprint: No need to embed HTML and CSS engines as we already have XAML. @lwansbrough I have not reached a good overview of the different pieces of making OpenGL works in UWP for c#, coming from Chakra, calling directly c++ dll or as suggested before, having a managed c++ layer, and how OpenTK would solve the issue. At this stage, I am still learning, deciding this path or using hybrid Webview or just everything javascript. However, it is great to have you taken this challenge persistently. |
The solution I'm working on uses a C# backend to interface with OpenGL (via OpenGL.Net) and ChakraCore. That means your Javascript bridge will be written in C# which I think is a huge bonus. Getting OpenGL to play with C# isn't the easiest thing to do, but the OpenGL.Net implementation is nice because it's all automated. I'm working on a readme right now for this project, I'll try to get it on GitHub today. |
Worth noting though that my implementation is HoloLens specific, but the code is almost entirely the same save for a few classes that manage holographics. |
If anyone is interested: https://github.com/lwansbrough/HolographicJS -- still very much a WIP. Doesn't work yet. |
I think these are good starting points for creating c# wrappers for |
The question here requires multiple steps |
Currently, in ChakraBridge or JsBridge for .NET, for 2D graphic context, Microsoft.Graphics.Canvas is used for Win2D.
Is it possible eventually to use Angle to provide the 3D graphic context in UWP to support for e.g. JsBridge, allowing c# to call WebGL js script?
What we are missing is to map WebGLRenderingContext to Angle, is that correct?
Embedding ChakraHost (c#) for WebGL example
How to add 3d context works in JsBridge by adding WebGLRenderingContext?
The text was updated successfully, but these errors were encountered: