148 {
149 auto clear_depth_emulated = [](float depth) {};
150 auto depth_range_emulated = [](float near_val, float far_val) {};
151
152 std::map<std::string, void*> gl_procs;
153
154 gl_procs["glGetError"] = (void*)&glGetError;
155 gl_procs["glClearDepthf"] = (void*)&clear_depth_emulated;
156 gl_procs["glDepthRangef"] = (void*)&depth_range_emulated;
157
158#define IMPELLER_PROC(name) gl_procs["gl" #name] = (void*)&gl##name;
168#undef IMPELLER_PROC
169
170 auto gl = std::make_unique<impeller::ProcTableGLES>(
171 [gl_procs = std::move(gl_procs)](const char* function_name) -> void* {
172 auto found = gl_procs.find(function_name);
173 if (found == gl_procs.end()) {
174 return nullptr;
175 }
176 return found->second;
177 });
178
180 impeller::Flags{}, std::move(gl), ShaderLibraryMappingsForApplication(),
181 false);
182
183 auto worker = std::make_shared<ReactorWorker>();
184 context->AddReactorWorker(worker);
185 return std::make_unique<ImpellerRenderContext>(std::move(context),
186 std::move(worker));
187}
static std::shared_ptr< ContextGLES > Create(const Flags &flags, std::unique_ptr< ProcTableGLES > gl, const std::vector< std::shared_ptr< fml::Mapping > > &shader_libraries, bool enable_gpu_tracing)
#define IMPELLER_PROC(proc_ivar)
#define FOR_EACH_IMPELLER_GLES3_PROC(PROC)
#define FOR_EACH_IMPELLER_ES_ONLY_PROC(PROC)
#define FOR_EACH_IMPELLER_PROC(PROC)