message: WebGL: reset VAO and texture bindings when frame ends.
diff: @@ -2971,6 +2971,15 @@ void OpenGLDriver::setPresentationTime(int64_t monotonic_clock_ns) {
  void OpenGLDriver::endFrame(uint32_t frameId) {
  //SYSTRACE_NAME("glFinish");
  +#if defined(__EMSCRIPTEN__)
  + // WebGL builds are single-threaded so users might manipulate various GL state after we're
  + // done with the frame. We do NOT officially support using Filament in this way, but we can
  + // at least do some minimal safety things here, such as resetting the VAO to 0.
  + mContext.bindVertexArray(nullptr);
  + for (int unit = OpenGLContext::MAX_TEXTURE_UNIT_COUNT - 1; unit >= 0; unit--) {
  + mContext.bindTexture(unit, GL_TEXTURE_2D, 0);
  + }
  +#endif
  //glFinish();
  insertEventMarker("endFrame");
  }
  