如何在没有Mesa的情况下设置OpenGL开发环境 [英] How to setup a OpenGL developement environment without Mesa

查看:160
本文介绍了如何在没有Mesa的情况下设置OpenGL开发环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我在这里阅读的内容: http://www.linuxquestions.org/questions/linux-software-2/opengl-vs-mesa-whats-the-diff-351037/

According to what i read here: http://www.linuxquestions.org/questions/linux-software-2/opengl-vs-mesa-whats-the-diff-351037/

Mesa是软件渲染,而驱动程序OpenGL是硬件渲染.

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

我遇到的每个教程都仅显示了如何安装Mesa.如何设置真正的(硬件加速)openGL?安装驱动程序会安装标题吗?如果是这样,哪个标头?如果我有一个使用mesa编译的程序,是否需要重新编译它以利用硬件加速的优势?如果安装驱动程序,则安装所需的库和头文件,台面会发生什么情况?

Every tutorial i came accross only show how to install Mesa. How can i set up a true (hardware accelerated) openGL? Does installing driver install the header? If so, which header? If i have a program compilled with mesa, do i have to recompile it to take the advantage of hardware accelerated? If installing the driver install the required library and header, what happen to mesa?

在指向该站点的最后一篇文章中:这是否意味着如果我安装了NVidia驱动程序,我应该删除mesa软件包吗?"

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

此外,现在openGL现在是第4和第5版,但是我找不到任何教程来展示如何为那些版本创建上下文,只有第3版(最大值)...

Also, now openGL is now version 4 and 5, but i can't find any tutorial that show how to create a context for those version, only version 3 max...

就像您看到的一样,我不太确定这是如何工作的.

Like you can see, im not very sure how this work.

这本书的最后一件事: http://glprogramming.com/red/适用于哪个版本的openGL?该指南的版本为1.1,但并未说明该版本是为哪个版本编写的.

One last thing, this book: http://glprogramming.com/red/ is for which version of openGL? The guide version is 1.1 but it don't say it was written for which version.

推荐答案

Mesa是软件渲染,而驱动程序OpenGL是硬件渲染.

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

不. Mesa是OpenGL API的开源实现,并且还提供了软件光栅化程序后备功能.但是Mesa还是 intel radeon radeonhd noveau 的开源GPU驱动程序的基础. /p>

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.

我遇到的每个教程都仅显示了如何安装Mesa.如何设置真正的(硬件加速)openGL?

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

OpenGL只是一个API.这意味着您使用哪种OpenGL实现都无关紧要.您可以使用Mesa进行开发,但是您的程序也可以在专有驱动程序下正常运行.

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?

有时.但是大多数Linux发行版都阻止了这种情况,并将Mesa标头作为规范的开发资源.

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

如果我有一个使用mesa编译的程序,是否需要重新编译它以利用硬件加速的优势?

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

不.如果您做对了所有事情,即将可执行文件与libGL动态链接,那么您的程序将可与任何OpenGL实现一起使用.

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?

取决于分布.某些发行版使用供应商驱动程序代替了libGL.so,但没有Mesa开发文件.一些发行版替代libGL.so和标头.某些发行版将OpenGL实现放在/usr/lib/opengl中,并提供了用于设置符号链接的工具(Gentoo).实际上,没关系.

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.

在指向该站点的最后一篇文章中:这是否意味着如果我安装了NVidia驱动程序,我应该删除mesa软件包吗?"

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

如果需要,您的发行版程序包管理器将发出警告.但是就像我说的那样:除了Mesa实现仅支持OpenGL-2.1之外,它不会打扰您.但这并不意味着您不能使用它来编译OpenGL-3和更高版本的程序.他们将无法创建OpenGL-3上下文并因错误消息而中止或退回到OpenGL-2

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

这篇关于如何在没有Mesa的情况下设置OpenGL开发环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆