- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在使用 C++ 和 OpenGL 编写跨平台库。我想知道如何检测我是在 OpenGL Desktop 还是 ES 上运行?
也许可以通过 glGetString(GL_SHADING_LANGUAGE_VERSION) 来实现?
最佳答案
解析版本字符串以告知有关 OpenGL 实现的任何信息一直是禁忌。它们仅用于人的眼睛,否则在报告版本号之前,将有一套更严格的规则来管理字符串的格式和合规性保证。
也就是说,GLES 规范在这个问题上比 GL 更严格,因此有可能:
The
GL_VERSION
string is laid out as follows:"OpenGL ES N.M vendor-specific information"
在 OpenGL 中,兼容的实现将格式化其 GL_VERSION
串成这样:
The
GL_VERSION
andGL_SHADING_LANGUAGE_VERSION
strings are laid out as follows:
<version number><space><vendor-specific information>
[...]
The version number is either of the form major number.minor number or major number.minor number.release number, where the numbers all have one or more digits.
这意味着在兼容的 OpenGL ES 实现中,版本字符串将以 OpenGL ES
开头。在 OpenGL 中,它将以数字开头(尽管我不认为“数字”仅限于字符 [0-9],因为所使用的语言含糊不清)。理论上,您可以使用此信息来区分两者。
但是您不应该因为实现报告了某个版本号就推断它实际上实现了合规性所需的功能集 - 这在过去是一个巨大问题OpenGL 2.0 的日子。
关于c++ - 如何检测opengl是运行在Desktop还是ES上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20745609/
我的网站有两个版本。桌面版和移动版。 当用户通过智能手机访问我的网站时,我将其指向“移动版本”->“m.mywebsite.com”。 为此,我使用了名为 Mobile Detect 的项目 到目前为
在java中,我尝试使用Desktop.getDesktop().open(File file)打开一个文件,但它抛出IOException,尽管Desktop.getDesktop().isSupp
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
JetBrains Compose for Desktop 中有没有办法更改标题栏背景颜色或仅将其更改为深色模式?我使用的是 MacOS,因此该栏可以是浅色或深色。也可以让标题栏本身不可见(但保留关闭
Tableau 架构显示 Desktop 连接到 Tableau Server(使用网关),然后连接到 Tableau Server 上的数据服务器。我的问题是 tableau 客户端必须与 tabl
我在 Flutter 桌面上工作了一段时间,并且实现过程中一切顺利。到目前为止,我只实现了 UI、网络和内存缓存。现在我开始面临一个真正的问题,我无法找到解决方案。是否有一些开箱即用的可能性将文件保存
有没有办法将 Github Desktop 中的文件更改列表显示为树而不是平面文件列表? 最佳答案 似乎该功能存在于桌面版 Git 的 v1 中,并在应用程序的 v2 中被删除。 2018 年有帖子要
有谁知道在移动浏览器中选择桌面 View 选项会如何影响 CSS 媒体查询和 Javascript? 我正在制作一个仅供移动用户使用的网站。当我在使用普通 Android 浏览器时选择“桌面 View
/usr/share/applications 中的.desktop 文件、xdg-desktop-menu 命令和update-desktop-database 命令之间有什么关系? 我正在尝试创建
当项目属于我的帐户(或我的组织之一)时,Github Desktop 让我可以轻松地从 Github 克隆项目。 我有什么办法可以使用 Github Desktop 克隆属于其他人的公共(public
我不想被 Selenium RC 启动的浏览器打扰。有什么方法可以强制它在另一个 X11 桌面上运行浏览器吗?在另一个桌面上运行 Selenuim 服务器并不能解决问题。 Vít Šesták 'v6
因此,我正在构建的 C 程序必须放置在我的 MAC 计算机 (OS X 10.9.4) 桌面上的 PA_mobile 文件中,以便它可以访问脚本和文本文件缓存与之相关。 现在,当我的程序启动时,它会验
为了在 Windows 平台上运行 Flutter,我使用 go-flutter-desktop 来实现。 我需要在单击按钮时打开 Excel 文件。 经过长时间的努力,我想分享这个片段 最佳答案 i
背景 我正在使用 Citrix Workspace(版本 20.2.0.25(2002))中的 Desktop Viewer 功能从我的家用计算机访问我的工作计算机。 请求 我希望能够更轻松地将我的(
我通过 NetBeans8.0 使用 Oracle JDK 1.8.0_05 在 Ubuntu 12.04 LTS 64 位(带有 Gnome Shell)上运行一些 Java 代码。 以下函数在 M
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/Scre
嗨,我有一个 Linux 实例,我正在使用桌面类。代码: String path = request.getParameter("path"); try {
当我选择在桌面应用程序中显示检查器时,出现以下错误。 正如他们的 Wiki 所说,我遵循了这个: http://wiki.appcelerator.org/display/guides/Enablin
我在 OSX、Objective-C 上。 我有一个像 这样的路径/NSURL /Users/xxx/Desktop/image2.png 但我将它传递给第三方应用程序,该应用程序会像 excpect
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 4年前关闭。 Improve this
我是一名优秀的程序员,十分优秀!