File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,12 @@ static void GLFWClearCanvas(GLFWwindow *window) {
199
199
glfwMakeContextCurrent (nullptr );
200
200
}
201
201
202
+ // Resolves the address of the specified OpenGL or OpenGL ES
203
+ // core or extension function, if it is supported by the current context.
204
+ static void * GLFWProcResolver (void *user_data, const char * name) {
205
+ return (void *) glfwGetProcAddress (name);
206
+ }
207
+
202
208
// Spins up an instance of the Flutter Engine.
203
209
//
204
210
// This function launches the Flutter Engine in a background thread, supplying
@@ -222,6 +228,7 @@ static FlutterEngine RunFlutterEngine(
222
228
config.open_gl .clear_current = GLFWClearContext;
223
229
config.open_gl .present = GLFWPresent;
224
230
config.open_gl .fbo_callback = GLFWGetActiveFbo;
231
+ config.open_gl .gl_proc_resolver = GLFWProcResolver;
225
232
FlutterProjectArgs args = {};
226
233
args.struct_size = sizeof (FlutterProjectArgs);
227
234
args.assets_path = assets_path.c_str ();
You can’t perform that action at this time.
0 commit comments