Back to Gfx

gfx-backend-gl

src/backend/gl/README.md

latest1.4 KB
Original Source

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

RenderDepthTexture

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 KindGLSL sampler
D1gsampler1D, sampler1DShadow
D1Arraygsampler1DArray, sampler1DArrayShadow
D2gsampler2D, gsampler2DMS, sampler2DShadow
D2Arraygsampler2DArray, gsampler2DMSArray, sampler2DArrayShadow
D3gsampler3D
CubegsamplerCube, samplerCubeShadow
CubeArraygsamplerCubeArray, samplerCubeArrayShadow

Buffer resource views are seen as gsamplerBuffer.

Rust basic typeGLSL (1.3 and above)
i32int
u32uint
f32float
f64double