12 releases (breaking)

0.9.0 Jun 19, 2021
0.7.1 Feb 24, 2021
0.6.1 Nov 6, 2020
0.5.1 May 7, 2020
0.1.0 Dec 27, 2018

#322 in Graphics APIs

Download history 7260/week @ 2021-07-03 6793/week @ 2021-07-10 7679/week @ 2021-07-17 8029/week @ 2021-07-24 8165/week @ 2021-07-31 7594/week @ 2021-08-07 7796/week @ 2021-08-14 9060/week @ 2021-08-21 7382/week @ 2021-08-28 6162/week @ 2021-09-04 7131/week @ 2021-09-11 6052/week @ 2021-09-18 6475/week @ 2021-09-25 5960/week @ 2021-10-02 5181/week @ 2021-10-09 5638/week @ 2021-10-16

26,156 downloads per month
Used in 113 crates (3 directly)

MIT/Apache

590KB
11K SLoC

gfx-backend-gl

OpenGL backend for gfx.

Can only be used on non-Apple Unix systems. The WSI is hard-coded to EGL.

Note: the Instance, Surface, PhysicalDevice, Device, and Queue can only have their methods called on the thread where Instance was created(!). Recording command buffers is free-threaded.

Normalized Coordinates

Render Depth Texture
render_coordinates depth_coordinates texture_coordinates

Binding Model

Dimensions of the model:

  1. Register type: uniform buffers, storage buffers, and combined texture-samplers
  2. Binding slot (0 .. MAX_COMBINED_TEXTURE_IMAGE_UNITS for textures)

GLSL Mirroring

Texture Kind GLSL sampler
D1 gsampler1D, sampler1DShadow
D1Array gsampler1DArray, sampler1DArrayShadow
D2 gsampler2D, gsampler2DMS, sampler2DShadow
D2Array gsampler2DArray, gsampler2DMSArray, sampler2DArrayShadow
D3 gsampler3D
Cube gsamplerCube, samplerCubeShadow
CubeArray gsamplerCubeArray, samplerCubeArrayShadow

Buffer resource views are seen as gsamplerBuffer.

Rust basic type GLSL (1.3 and above)
i32 int
u32 uint
f32 float
f64 double

Dependencies

~6.5–9.5MB
~209K SLoC