How to setup a OpenGL developement environment without Mesa

人盡茶涼 提交于 2019-12-06 09:40:34

Mesa is software rendering, while driver OpenGL is hardware rendering.

No. Mesa is an open source implementation of the OpenGL API and also provides a software rasterizer fallback. But Mesa is also the foundation for the open source GPU drivers for intel, radeon, radeonhd and noveau.

Every tutorial i came accross only show how to install Mesa. How can i set up a true (hardware accelerated) openGL?

OpenGL is just an API. That means it doesn't matter which implementation of OpenGL you use for development. You can develop with Mesa, but your program will run fine with propriatary drivers as well.

Does installing driver install the header?

Sometimes. But most Linux distributions prevent this and assume the Mesa headers as the canonical development resource.

If i have a program compilled with mesa, do i have to recompile it to take the advantage of hardware accelerated?

No. If you did everything right, i.e. linked your executable dynamically against libGL.so your program will work with any OpenGL implementation.

If installing the driver install the required library and header, what happen to mesa?

Depends on the distribution. Some distributions have the vendor driver replace libGL.so, but not the Mesa development files. Some distributions replace libGL.so and the headers. And some distributions put OpenGL implementations in /usr/lib/opengl and provide a tool for setting up symlinks (Gentoo). In practice, it doesn't matter.

From the last post on the pointed site: "Does that mean that I should remove mesa packages if I have NVidia drivers installed?"

Your distributions package manager will emit a warning if that's required. But like I said: It should no bother you, except, that the Mesa implementation supports only OpenGL-2.1. But that doesn't mean you cannot compile OpenGL-3 and upwards programs with it. They will just be not able to create an OpenGL-3 context and abort with an error message or fall back to OpenGL-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!