This commit gives custom `CAEAGLLayer` instance a chance to set the `opaque` property through the `style` property. Currently, the `GlContext` implementation for `CAEAGLLayer` always sets the layer's `opaque` property to `true` explicitly no matter what the original value is. Though setting the layer as opaque does help for performance, there are times this option should be turned off by decision. Now the `opaque` property is respected if setting in the `style` dictionary.
This commit fixes the bug that the bgfx does not respect the `devicePixelRatio` parameter passed to nanovg's `nvgBeginFrame()` function. The problem is caused by the `bgfx::setViewRect()` call defined in the `nvgRenderViewport()` function, as it should take size in consideration of the `devicePixelRatio` value.
However, this commit does not fix nanovg's example app because currently there is no easy way to pass the scale value to the `ExampleNanoVG::update()` method as it calls `nvgBeginFrame()`.
This commit moves the additional nanovg functions for bgfx to a separate header file, so it is possible to compile the original nanovg source files with bgfx in a custom build environment.
Change vs_ibl_skybox.sc to correctly use radians instead of degrees when
specifying field-of-view. Additionally, use u_viewRect to find the correct
aspect ratio of the viewport, instead of hard-coding to 4/3.
Change fs_ibl_skybox.sc, fixing a number of small issues and mistakes. These
mistakes would lead to incorrect lighting results, especially with metallic
materials at glancing angles.
This commit does not include the rebuilt .bin output of shaderc for these
shaders.