开发者

Can you use mutiple Xlib Display connections and multiple eglDisplay connections in one application

开发者 https://www.devze.com 2023-03-20 09:29 出处:网络
One to One sharing of Display to eglDisplay. No sharing of windows or surfaces. Is i开发者_高级运维t possible? Are there any gotchas I should know about?You can have as many Display connections as you

One to One sharing of Display to eglDisplay.

No sharing of windows or surfaces.

Is i开发者_高级运维t possible? Are there any gotchas I should know about?


You can have as many Display connections as you wish in your program. The only potential problem is getting events from many connections simultaneously. You can't just use XNextEvent for that like in a normal single-display application. You need to extract ConnectionNumber from each Display, put them in an fdset and wait for an event with select (on POSIX systems at least). Then call XNextEvent on a connection that select reports ready.

I'm not sure about eglDisplay, but given that it can be obtained from Display, I'd say there should be no problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消