mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 07:23:24 +09:00
[tools] (P12): Linux glws creates a headless window surface for MOBILEGL_TRACE_SURFACE=window - the MobileGL server's window under MOBILEGL_IPC_SURFACE=server, refused by name otherwise
This commit is contained in:
@@ -463,6 +463,29 @@ private:
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (shouldCreateWindowSurface()) {
|
||||||
|
// P12 (on-screen server window), D9. A LINUX REPLAY HAS NO WINDOW OF ITS OWN: the window
|
||||||
|
// surface is the MobileGL SERVER's (MOBILEGL_IPC_SURFACE=server, WindowKind::ServerOwned),
|
||||||
|
// so the native window is none and the size the trace wants rides EGL_WIDTH/EGL_HEIGHT.
|
||||||
|
// Without that knob MobileGL refuses a null window (EGL_BAD_NATIVE_WINDOW) and this says
|
||||||
|
// why. resize() re-creates the surface at the new size, as it does the pbuffer.
|
||||||
|
const EGLint windowAttribs[] = {
|
||||||
|
EGL_WIDTH, surfaceWidth,
|
||||||
|
EGL_HEIGHT, surfaceHeight,
|
||||||
|
EGL_NONE,
|
||||||
|
};
|
||||||
|
surface = gEgl.createWindowSurface(gDisplay, static_cast<const EglVisual *>(visual)->config,
|
||||||
|
EGLNativeWindowType{}, windowAttribs);
|
||||||
|
if (surface == EGL_NO_SURFACE) {
|
||||||
|
std::cerr << "error: EGL window surface creation failed: 0x" << std::hex << gEgl.getError()
|
||||||
|
<< std::dec
|
||||||
|
<< " - a Linux replay has no window of its own; --window-surface renders on the "
|
||||||
|
"MobileGL server's window and needs MOBILEGL_IPC_SURFACE=server against a server "
|
||||||
|
"that owns a display\n";
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
const EGLint attribs[] = {
|
const EGLint attribs[] = {
|
||||||
EGL_WIDTH, surfaceWidth,
|
EGL_WIDTH, surfaceWidth,
|
||||||
|
|||||||
Reference in New Issue
Block a user