* The event browser called SetEventID from OnCaptureLoaded, which would then
call OnEventChanged on all viewers, which if they kicked off work could happen
at the same time as the later call to OpCaptureLoaded for them.
* In the mesh viewer this seemed to lead to a race condition and had a chance to
corrupt memory.
* Check for EXT_sRGB_write_control extension before enabling. The equivalent
extension EXT_framebuffer_sRGB on desktop GL has been core since 3.1.
* Look for EGL_KHR_gl_colorspace extension and request an sRGB surface when
creating window surfaces.
* Environment variables are not user-friendly, but I don't want to promote this
to a capture option since it's so niche.
* In future perhaps it will be feasible to support selecting an arbitrary API
to capture, or even capturing multiple APIs simultaneously - though with GLES-
on-GL that will be quite difficult.
* On windows we can load libEGL which then loads opengl32.dll, so we ensure that
opengl32.dll is loaded first at startup rather than have it appear last-minute
in a recursive call.
* Likewise, when using EGL we forcibly forget all GL function pointers and fetch
them through eglGetProcAddress, rather than having a mix-and-match dispatch
table.
* Requires either driver support (EXT_create_context_es2_profile) or a GLES
emulating library like ANGLE.
* Note however that ANGLE doesn't at this point meet the minspec for replay, so
it can only be captured from.
* Render passes and framebuffers can have as many attachments as desired, and
just use a small subset in each subpass. We shouldn't add an artificial limit
without good reason.
* When selecting a marker region, the more intuitive search is to find children
of the marker first before searching onwards, even if the 'current event' is
at the end of the marker region.
* Sometimes a GLES implementation can refuse to copy back the 'native'
format/type, most commonly if you want to read back from a GL_RGB texture it
might require you to readback GL_RGBA.
* We handle this by just reading back the requested format in this case, and
then copying only RGB tightly into the output buffer.
* Unfortunately it seems like sometimes in GL when creating an GL_RGB
internalformat texture you can copy from another GL_RGB internalformat
texture. Other times you can't.
* In particular the difference can just be the 'type' parameter passed when
passing initial data, GL_UNSIGNED_BYTE vs eGL_UNSIGNED_SHORT_5_6_5
* We treat this as a 'soft' hint, so if it's not present we fall back to the old
path.