Hello guys,
I am very pleased by your work! I am happy you created such a great framework!
Now, I have a problem with Render to Target technique.
I created a small project in OpenGL ES 2.0. Decided to port it to Windows 8.1 & Windows Phone 8.1.
I chose to use the Angle Project.
I use the ms-master branch. I got it on 1st february 2016.
To create the application I first installed the windows store ANGLE template (XAML) located at this path: angle-ms-master\templates\8.1\Store Apps\Universal Apps\UniversalSwapChainPanel\ using the install.bat script from angle-ms-master\templates.
I built the libs (libANGLE.lib, libEGL.lib, libEGLESv2.lib and the others) myself using VS 2013 + Update 4.
All works well, except the render to target part of the code on windows phone 8.1.
To debug I tried to render a simple spinning cube. Which renders ok on windows phone if I use the default framebuffer, but not with a custom one. I get nothing. The screen is black. While debugging I searched the angle sources and used breakpoints inside sources, but to no extent.
The spinning cube and the project altoghether work well when using the custom framebuffer on PC or a surface tablet.
I tested on Nokia Lumia 1520 and Nokia Lumia 920, but to no result. Same black screen.
I did this test: on both devices if I just bind the FBO, but don't render anything in it I just get the framebuffer clear color on screen (which is ok).
In all cases I also get a message in console:
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults. [ EXECUTION WARNING #352: DEVICE_DRAW_SAMPLER_NOT_SET]
I have almost none DirectX knowledge, so I looked it up. It seems I get this warning, because DirectX creates and sets a default sampler state to the texture. Usually the dev should use his/her own sampler state.
I see no reason why the FBO should not work on WP8.1. I am just missing something. Hope you guys can help me!
One more thing: I observed that both devices (lumia 1520 and 920) don't support depth texture. This means I won't be able to sample from it directly. The other way is to attach a renderbuffer to the FBO as a depth attachement and copy the data from VRAM to a texture and then sample from it.
Second thing: I saw that there is a closed issue #49 regarding depth textures on WP8.1 and I know it's because the lack of hardware support.
If you need more info from me, just ask!
Thanks!