GUI subsystem architecture explain

How haiku gui subsystem works?
How divide gui-less binary and gui binary apps via IPC? Its possible?
Is possible totally disable native “display server” and run single opengl app controlling whole display?

Haiku has app_server process that manage windows and input. Compositing is not used, client send graphics commands that are rendered by app_server. Unlike X11, Haiku app_server have modern 2d graphics and font rendering engine. Client applications use to interact with app_server. IPC (kernel objects called ports) and shared memory are used to communicate with app_server.

GUI applications are listed in Registrar and can be checked with BRoster.

No, it is currently not possible. Haiku OpenGL API depends on app_server for bitmap creation. Note that Haiku do not support hardware graphics acceleration yet, OpenGL are rendered in software by Mesa LLVM backend.

1 Like

Actually, most of the graphics card driver code is not in the kernel, but in app_server. It is not even possible to set a video mode without running that code, so app_server is required for pretty much any graphics operation. It’s not just an OpenGL API problem.

But that doesn’t prevent running one single app in full screen and removing Tracker and Deskbar if you want to.

1 Like

More precisely in accelerant add on. Accelerant can be used outside app_server, there is SlimDemo in BeOS sample code that demonstrates graphics without app_server.

I don’t know that topic author want to do, but there are no problem to show regular fullscreen window with BGLView. app_server do not consume a lot of memory and do not introduce significant overhead.

Thank you alot for answer!
I just want implement my own simple “interface server” (like “app_server” here) to understand how it may works, it’s kind of selfstudy for me.
Is haiku ports are the same to mach ports(in idea)? Exist some small example of code how to use it?
its right that i can use accelerant and mesa to impliment opengl context standalone?
//what a main idea of haiku?

You can see SlimDemo to see how to interact with accelerant (Haiku userland video adapter driver). Code is old and may need adaptations.

HaikuPorts repository is located at Package build instructions are defined in *.recipe files, you can lookup existing recipes to understand how it works. Recipes are built with haikuporter utility.

Accelerant will provide you framebuffer pointer that can be used for drawing. It have no OpenGL support. You can use OSMesa for OpenGL drawing on framebuffer.