Skip to content
프로젝트

소개

Intermediate Graphics Library(IGL)는 GPU를 제어하는 크로스 플랫폼 라이브러리입니다. OpenGL, Metal, Vulkan 등 다양한 그래픽 API 위에서 하나의 저수준 크로스 플랫폼 인터페이스를 제공합니다.

창작 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+2
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
IGL Logo

Build Status

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

OpenGL ES, DirectX 12, WebGPU and WebGL are opt-in: IGL_WITH_OPENGLES, IGL_WITH_D3D12, IGL_WITH_WEBGPU and IGL_WITH_WEBGL default to OFF.

Supported platforms

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

API Support

Windows Linux macOS iOS Android
Vulkan 1.2 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: (MoltenVK) :heavy_multiplication_x: :heavy_check_mark: (Quest 2/3/Pro)
OpenGL ES 2.0 - 3.0 :heavy_check_mark: (Angle) :heavy_check_mark: (Angle) :heavy_multiplication_x: :heavy_check_mark: :heavy_check_mark:
OpenGL ES 3.1 - 3.2 :heavy_check_mark: (Angle) :heavy_check_mark: (Angle) :heavy_multiplication_x: :heavy_multiplication_x: :heavy_check_mark:
OpenGL 3.1 - 4.6 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x:
Metal 2 :heavy_multiplication_x: :heavy_multiplication_x: :heavy_check_mark: :heavy_check_mark: :heavy_multiplication_x:
DirectX 12 :heavy_check_mark: :heavy_multiplication_x: :heavy_multiplication_x: :heavy_multiplication_x: :heavy_multiplication_x:

WebGPU is not in the table because it is not tied to one native platform: igl::webgpu runs on Dawn natively (Metal on macOS and iOS, Vulkan on Linux) and in the browser through Emscripten's emdawnwebgpu. Win32 and Android surfaces are not covered yet. Shaders are WGSL. See src/igl/webgpu/ROADMAP.md for the current state.

Shading languages

Shaders can be written in GLSL, MSL, HLSL or SparkSL, and in Slang. A Slang shader is written once and compiled ahead of time to SPIR-V, MSL, HLSL, WGSL and GLSL, so the same source runs on every backend. The generated C++ headers are checked in, so building IGL never runs slangc.

See tools/slang/README.md for how programs are declared and regenerated, and shell/renderSessions/slang/README.md for the two render sessions written entirely in Slang.

Build

Before building, run the deployment scripts:

python3 deploy_content.py
python3 deploy_deps.py

These scripts download external third-party dependencies. Please check Dependencies for the full list.

  • Windows
cd build
cmake .. -G "Visual Studio 17 2022"
  • Linux
sudo apt-get install clang xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev
cd build
cmake .. -G "Unix Makefiles"
  • macOS
cd build
cmake .. -G "Xcode" -DIGL_WITH_VULKAN=OFF
  • iOS
cd build
cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=../third-party/deps/src/ios-cmake/ios.toolchain.cmake -DDEPLOYMENT_TARGET=13.0 -DPLATFORM=OS64
  • Android

The Gradle project is located within the build/android folder.

  • WebAssembly

Please install Emscripten and Ninja.

cd build
emcmake cmake .. -G Ninja
cmake --build .

Samples

Three desktop samples and over thirty render sessions ship with IGL, covering bind groups, bindless buffers, texture views, specialization constants, mesh shaders, indirect draws, subpasses, YUV sampling, GPU timers and the two Slang sessions. They are listed in getting-started.md and built by default (IGL_WITH_SAMPLES).

Screenshots

image

image

License

IGL is released under the MIT license, see LICENSE.md for the full text as well as third-party library acknowledgements. SparkSL Compiler is released under the SparkSL Compiler License, see LICENSE for full text.

관련 프로젝트 살펴보기

불러오는 중…