File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
#include " flutter_application.h"
6
6
7
+ #include < EGL/egl.h>
7
8
#include < sys/types.h>
8
9
#include < unistd.h>
9
10
@@ -81,6 +82,15 @@ FlutterApplication::FlutterApplication(
81
82
return reinterpret_cast <FlutterApplication*>(userdata)
82
83
->render_delegate_ .OnApplicationGetOnscreenFBO ();
83
84
};
85
+ config.open_gl .gl_proc_resolver = [](void * userdata,
86
+ const char * name) -> void * {
87
+ auto address = eglGetProcAddress (name);
88
+ if (address != nullptr ) {
89
+ return reinterpret_cast <void *>(address);
90
+ }
91
+ FLWAY_ERROR << " Tried unsuccessfully to resolve: " << name << std::endl;
92
+ return nullptr ;
93
+ };
84
94
85
95
// TODO: Pipe this in through command line args.
86
96
#define MY_PROJECT \
Original file line number Diff line number Diff line change 9
9
#include " wayland_display.h"
10
10
11
11
#include < stdlib.h>
12
+ #include < unistd.h>
12
13
13
14
#include < cstring>
14
15
@@ -110,7 +111,9 @@ bool WaylandDisplay::Run() {
110
111
return false ;
111
112
}
112
113
113
- FLWAY_WIP;
114
+ while (valid_) {
115
+ wl_display_dispatch (display_);
116
+ }
114
117
115
118
return true ;
116
119
}
@@ -325,7 +328,7 @@ bool WaylandDisplay::OnApplicationPresent() {
325
328
return false ;
326
329
}
327
330
328
- if (eglSwapBuffers (egl_display_, surface_ ) != EGL_TRUE) {
331
+ if (eglSwapBuffers (egl_display_, egl_surface_ ) != EGL_TRUE) {
329
332
LogLastEGLError ();
330
333
FLWAY_ERROR << " Could not swap the EGL buffer." << std::endl;
331
334
return false ;
You can’t perform that action at this time.
0 commit comments