There is a project called RPCS3 which aims to emulate the PS3 gaming console.
Being a Linux user and a someone who enjoys emulation i felt i could give a hand , limited to my knowledge and time, but something that would help.
After some time, too much in fact, and helped by the community surrounding the emulator - https://github.com/RPCS3/rpcs3/issues/2186#issuecomment-255329581 - i was able to achieve something.
Also due to take a look at https://gist.github.com/graphitemaster/e162a24e57379af840d4 if you are willing to start with Vulkan.
The application uses WxWidgets as its GUI lib, and it can have a lot of backends (GTK2,GTK3,Windows) etc.. so the main work was to retrieve the X11 surface id to create a swapchain and integrate it with all the amazing code the team had already made.
A snippet of the code, for GTK2, is below
1 2 3 4 5 | GtkWidget * widget=(GtkWidget*)m_frame->handle(); gtk_widget_realize(widget); Display* display = GDK_DISPLAY_XDISPLAY(gtk_widget_get_display(widget)); xcb_connection_t * c=XGetXCBConnection(display); xcb_window_t w; |
More info can be found at http://stackoverflow.com/questions/14788439/getting-x11-window-handle-from-gtkwidget
Also GCC not being able to compile the code whereas Clang would was a nice surprise :) Go Apple Go i guess :)
There are some bugs to be handled, however
Sem comentários:
Enviar um comentário