• 欢迎访问3y4.net
  • 请使用Edge、Chrome或Firefox测试显示内容。

C++开源图形库:Intermediate Graphics Library (IGL)

经典软件 wes 1年前 (2023-07-09) 903次浏览

        Intermediate Graphics Library(IGL)是一个支持多个平台图形库,基于C++语言,已于2023-07-08宣布开源,使用MIT协议,该图形库支持的平台包括WindowsLinuxmacOSiOSAndroid等,3y4.net也在体验中,C++语言直接使用,正在测试封装供其他语言使用,比如Python、Java、Delphi(Pascal/Lazarus)等。

        Meta 宣布开源 Intermediate Graphics Library(IGL)。IGL 为开发者提供了一组强大的工具为其应用创建高质量的视效和图形,能满足游戏、3D 建模等应用的需求。IGL 是一个跨平台图形库,支持 OpenGL、OpenGL ES、WebGL 和 Vulkan 等图形 API,它的开销小,外部依赖少。Meta 称 IGL 的特性包括:跨平台兼容,高性能渲染,易于使用的 API,可扩展,已完全开源。

英文介绍:

Intermediate Graphics Library (IGL) is a cross-platform library that commands the GPU. It encapsulates common GPU functionality with a low-level cross-platform interface. IGL is designed to support multiple backends implemented on top of various graphics APIs (e.g. OpenGL, Metal and Vulkan) with a common interface.

There are a lot of good options for abstracting GPU API’s; each making different trade-offs. We designed IGL around the following priorities:

  1. Low-level, forward-looking API. IGL embraces modern abstractions (command buffers, state containers, bindless, etc) and is designed to give more control than OpenGL’s state machine API. As a result, IGL can have leaner backends for modern API’s (e.g. Metal, Vulkan).
  2. Minimal overhead for C++. IGL supports new or existing native rendering code without overhead of language interop or the need for other language runtimes.
  3. Reach + scale in production. IGL has been globally battle-tested for broad device reliability (especially the long-tail of Android devices as well as Quest 2/3/Pro compatibility for OpenGL/Vulkan) and performance-tuned on our apps.

Supported rendering backends

Supported platforms

  • Android
  • iOS
  • Linux
  • macOS
  • Windows
  • WebAssembly

API Support

Windows Linux macOS iOS Android
Vulkan 1.1 ✔️ ✔️ ✔️ (MoltenVK) ✖️ ✔️ (Quest 2/3/Pro)
OpenGL ES 2.0 – 3.0 ✔️ (Angle) ✔️ (Angle) ✔️ ✔️ ✔️
OpenGL ES 3.1 – 3.2 ✔️ (Angle) ✔️ (Angle) ✖️ ✖️ ✔️
OpenGL 3.1 – 4.6 ✔️ ✔️ ✖️ ✖️ ✖️
Metal 2 ✖️ ✖️ ✔️ ✔️ ✖️

https://www.khronos.org/blog/meta-uses-khronos-open-standards-in-new-intermediate-graphics-library

https://www.gamingonlinux.com/2023/07/meta-announced-igl-a-high-performance-cross-platform-graphics-library/

Meta announced ‘IGL’, a high-performance cross-platform graphics library

By Liam Dawe – 8 July 2023 at 3:19 pm UTC

Available under the MIT license, Meta (as in Facebook) have released IGL (Intermediate Graphics Library) for developers. This was officially announced on The Khronos Group blog (who oversee various open standards), written by Meta developers.

Supporting OpenGL, OpenGL ES, WebGL, Vulkan and Metal and it’s cross-platform for Android, iOS, Linux, macOS, Windows and WebAssembly. They hope to see developers using it across the industry whether you’re “working on a game, a 3D modeling application or any other project that requires top-notch graphics” they say that “IGL has got you covered”.

Key features of Meta’s IGL:

  • Cross-platform compatibility: In addition to the functionality mentioned above, IGL also provides a shell library, allowing users to compile and run on the most popular platforms including Windows, Linux, Mac OS, iOS, Android and WebAssembly.
  • High-performance rendering: IGL is optimized to provide lightning-fast rendering, even when dealing with complex and detailed graphics.
  • Easy-to-use API: An intuitive and easy-to-use API means that IGL is simple and straightforward to work with. Rather than introducing RHI as part of the high-level engine abstraction or mimicking one graphics interface behind another, IGL takes a new approach to abstracting RHI by creating a new modern interface, which is close to Vulkan or WebGPU on the abstraction layer, but general enough to avoid being engine-specific.
  • Extensibility: IGL was built with extensibility in mind, allowing users to easily add new features and functionality as their needs evolve.
  • Open source: IGL is completely open source and can be used for any project, commercial or otherwise, without any licensing restrictions.

They have an interesting roadmap of what they hope to bring to it too including a multi-threading API, asynchronous loading of resources, a synchronization primitives API and more. Going by the GitHub page they say it has already been “battle-tested” used with Android, Quest 2 / 3 / Pro with OpenGL / Vulkan and their own apps.

You can find it on GitHub.


转载3y4.net请注明 --> 原文链接
喜欢 (2)