Closed miguel12345 closed 9 years ago
Can you clarify what you need the device for? (that will help us to understand priority of this request and what the right way to go about it is)
In the WP8/Silverlight model, apps HAD to know about and do things with the D3D device, but with the version in future-dev most apps can just use standard EGL calls and never need to touch D3D at all.
In my case I needed to implement a video player that rendered the video's frame to a opengl texture. I have been using IMFMediaEngine since it was a simple and elegant solution to the problem (trying to compile ffmpeg for windows phone revealed to be a nightmare).
IMFMediaEngine requires a ID3D11Device in order to use its hardware-accelerated mode and when you request the next frame from the video, it needs to be given a ID3D11Texture2D (that needs a ID3D11Device in order to be created) for rendering.
Do you need this to be the same device that Angle is using? I'm wondering if you could create another, separate D3D device of your own for MF usage.
That is a good point. I only do all of this to get the pixel data from the d3d texture, so I think that creating a new device is ok. I don't know if there is any problem in having two ID3D11Device's in the same app/thread though.
I'll have to test it. Can I leave this issue open and give some feedback about my tests tomorrow?
Thank you
Multiple devices are fine. In fact this may be better as it will allow Media Foundation to use one device independently of your Angle rendering.
Absolutely, please let us know how you get on - this will be useful data for us to help prioritize future improvements to Angle.
Hi, just to give you a heads up regarding my problem, I was able to create a texture and my player works fine now. Thank you. I will close this issue since you already mentioned that this was a design decision
I am working in a cocos2d-x v3.3 project that uses the new ANGLE version for winrt 8.1 and I need a reference to the current ID3D11Device
When I was using the old ANGLE lib in a wp8 project, the user was responsible for creating and managing the ID3D11Device but now it is hidden under ANGLE.
Is there any way to get ID3D11Device when it is created and managed inside ANGLE?