docs/engine/impeller/docs/opengles_development_setup.md
Out of the box, playgrounds should be functional with OpenGL ES.
Interactive playground windows are disabled by default and need to be explicitly enabled.
When working with playgrounds, it is often a good idea to disable the test timeout watchdog that kills tests that appear to have hung (the default timeout is 300 seconds).
Do both using:
--enable_playground --timeout=0
By default, the playgrounds will try to use the default OpenGL ES driver available on the host. This usually works fine on Linux and Windows but it may be a good idea to use the Angle OpenGL ES emulation layer if you don't have the default driver. The macOS OpenGL driver is a bit of a disaster and Angle will be used by default.
--use_angle
To verify that you are using Angle, refer to the window title which specifies if Angle (or SwiftShader with Vulkan) is being used.
Your playgrounds will run one after another. You can skip to the next one by pressing either ESC, q, or closing the window. To skip all remaining tests, press Shift + ESC.
If you are visually verifying a subset of tests quickly, you can specify how long each playground window will remain open. The next playground window will open after the timeout.
--playground_timeout_ms=1000
[!TIP] To render one and only frame of each playground, specify the a timeout of 0 milliseconds.
You are typically only going to run a small subset of tests during development. Pass a regex to the GTest filter to restrict running just the playgrounds you are interested in.
To construct the regex, remember the following convention:
"Play/" prefix."/Metal", "/OpenGLES", and "/Vulkan".If you are running just the playgrounds with the OpenGL ES backend, you'd do something like:
--gtest_filter="Play/*Foo*/OpenGLES"
On the other hand, if you are comparing the results of different backends, try something like:
--gtest_filter="Play/*Foo*/*"
The backend used along with any driver specific modifier (like the use of Angle or SwiftShader) will appear in the Window title.
The best OpenGL ES frame debugger and profiler on macOS is a Metal frame debugger and profiler.
Setup Xcode for frame captures with Playgrounds using the documented instructions. You should already be familiar with reading Metal frame captures.
We are going to use Angle to translate OpenGL ES calls into Metal calls and then debug/profile the results. You can switch backends by tinkering with the filters as command line arguments in Xcode run scheme.
[!TIP] You'll be editing the Xcode run scheme a lot as you switch backends and tests. The shortcut to edit the scheme is
⌘ + ⇧ + r.
An alternative on non-macOS platforms is RenderDoc. Instructions to setup RenderDoc are here. RenderDoc is not available on macOS.
EXT_discard_framebuffer and memory usage.