How to get an image from XAML app to C# DirectX

ILoveARILoveAR
edited January 25 in Questions And Answers

Hi!

I have started a project which I did not expect to be this much trouble. I want to display a website in a HoloLens 3D application.
I have come a long way, quickly finding out this is now impossible through Unity and have found DirectX and SharpDX.
I am almost done, I have a webview in a XAML application that I make an image of, and I have a very simple 3D DirectX environment with a cube I would like to view this image on.
This has stumped me for the last days and I am just completely stuck. Programming directly in DirectX is just way over my head but I would really like to get this PoC done and display a website.
All I have to do is display the image, but I have no idea how to go about that. Seems like there used to be toolkits to help with DirectX development, but they have all stopped about 5 years ago (I assume when Unity began doing stuff)

  1. How do I make a Texture2D from a byte array? Of maybe a SharpDX.WIC.BitmapSource?
  2. How do I change the texture on the cube without causing some kind of memory error?

I am going crazy, please help. If anyone want I can show the stuff I've tried, but honestly, it's just too much of ramble code right now. Or maybe show how this could be done using Unity, which would be much preferred.

Tagged:
Sign In or Register to comment.