Expand description
§OpenGL backend internals.
The main target is OpenGL ES3 on Linux and Android.
§Binding model
Binding model is the biggest and most painful difference with gfx-hal API.
First, the bindings get linearized into the pipeline layout (see PipelineLayoutSet
).
Then a pipeline gets created, and we track all the texture-sampler associations.
We only support at most one sampler used with each texture so far. The linear index
of this sampler is stored per texture slot in SamplerBindMap
array.
The texture-sampler pairs get potentially invalidated in 2 places:
- when a new pipeline is bound, we update the linear indices of associated samplers
- when a new descriptor set is bound, we update both the textures and the samplers
We expect that the changes to sampler states between any 2 pipelines of the same layout will be minimal, if any.
Structs§
- Device
- GL device.
- GlContext
- Info
- OpenGL implementation information
- Instance
- Physical
Device - Platform
Name - A unique platform identifier that does not change between releases
- Queue
Family - Starc
- Single-threaded
Arc
. Wrapper forArc
that allows you toSend
it even ifT: !Sync
. Yet internal data cannot be accessed outside of the thread where it was created. - Surface
- Swapchain
- Version
- A version number for a specific component of an OpenGL implementation
- Wstarc
- Single-threaded
Weak
. Wrapper forWeak
that allows you toSend
it even ifT: !Sync
. Yet internal data cannot be accessed outside of the thread where it was created.