How work Mesa?

Hi,

I’m asking it here…
I “know” Haiku don’t use accelerated GPU. So I imagine when I compile a code with OpenGL functions in Haiku, this same app will “call directly Mesa library” to work with CPU rendering? (Say me if I’m wrong)

But is it the same on a Linux distribution as example? Imagine I don’t have 3D stuff on my GPU or maybe have only access to OpenGL 2.1 stuff, Mesa will be called at this time automatically if the function of upper version of OpenGL is called?..Or I must develop an app through a Mesa “dedicaced language” for making a 3D app work through the CPU?

So is there a difference between how Mesa is called in Haiku and an other OS?

No. OpenGl is the api that is used. From the application‘s point of view there is no difference, just a very slow renderer.

I don’t really understand your reply…You don’t mention Mesa here. And my question porting on mainly on Mesa. You said OpenGL was the API used but it’s connected to Mesa no? (about software rendering?) And I have in mind the Haiku only use software rendering for now. But maybe I’m wrong about this point.

Mesa is an implementation of OpenGL. In, fact, it pretty much is THE implementation of OpenGL in use everywhere. Both in Linux and in Haiku.

Wether the rendering happens on the CPU or on the GPU is handled entirely inside Mesa. For the applications, there is no difference. You link to libGL.so and you call functions from libGL.so. These functions are defined in the OpenGL specification and implemented by Mesa.

Inside Mesa, there is code to route things to the proper place. But if you are writing an application, you don’t even need to think about it.

2 Likes