98 {
99 auto clear_depth_emulated = [](float depth) {};
100 auto depth_range_emulated = [](float near_val, float far_val) {};
101
102 std::map<std::string, void*> gl_procs;
103
104 gl_procs["glGetError"] = (void*)&glGetError;
105 gl_procs["glClearDepthf"] = (void*)&clear_depth_emulated;
106 gl_procs["glDepthRangef"] = (void*)&depth_range_emulated;
107
108#define IMPELLER_PROC(name) gl_procs["gl" #name] = (void*)&gl##name;
118#undef IMPELLER_PROC
119
120 auto gl = std::make_unique<impeller::ProcTableGLES>(
121 [gl_procs = std::move(gl_procs)](const char* function_name) -> void* {
122 auto found = gl_procs.find(function_name);
123 if (found == gl_procs.end()) {
124 return nullptr;
125 }
126 return found->second;
127 });
128
130 impeller::Flags{}, std::move(gl), ShaderLibraryMappingsForApplication(),
131 false);
132
133 auto worker = std::make_shared<ReactorWorker>();
134 context->AddReactorWorker(worker);
135 return std::make_unique<ImpellerRenderContext>(std::move(context),
136 std::move(worker));
137}
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)