66 handle_(nullptr, &DestroyWindowHandle),
67 worker_(std::shared_ptr<ReactorWorker>(new ReactorWorker())),
68 use_angle_(switches.use_angle) {
69 if (use_angle_) {
70#if IMPELLER_PLAYGROUND_SUPPORTS_ANGLE
71 angle_glesv2_ = dlopen("libGLESv2.dylib", RTLD_LAZY);
72#endif
74 }
75
76 ::glfwDefaultWindowHints();
77
78#if FML_OS_MACOSX
79 FML_CHECK(use_angle_) <<
"Must use Angle on macOS for OpenGL ES.";
80 ::glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
81#endif
82 ::glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
83 ::glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
84 ::glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
85 ::glfwWindowHint(GLFW_RED_BITS, 8);
86 ::glfwWindowHint(GLFW_GREEN_BITS, 8);
87 ::glfwWindowHint(GLFW_BLUE_BITS, 8);
88 ::glfwWindowHint(GLFW_ALPHA_BITS, 8);
89 ::glfwWindowHint(GLFW_DEPTH_BITS, 32);
90 ::glfwWindowHint(GLFW_STENCIL_BITS, 8);
91 ::glfwWindowHint(GLFW_SAMPLES, 4);
92
94
95 auto window = ::glfwCreateWindow(1, 1,
"Test",
nullptr,
nullptr);
96
97 ::glfwMakeContextCurrent(
window);
98 worker_->SetReactionsAllowedOnCurrentThread(true);
99
101}
PlaygroundImpl(PlaygroundSwitches switches)
#define FML_CHECK(condition)