Vercidium @vercidium.com · Dec 2

The best change is that textures are now bound at the same time uniforms are set. This uniform class is the only time that glActiveTexture is called, which means uniforms and textures will never be out of sync.

2 likes 1 replies

?

Replies

Vercidium · Dec 2

The TextureUnitHelper just keeps track of a counter that resets when a shader is bound, to ensure two different textures / sampler types aren't using the same texture unit. Bindless textures would also solve this, but I'd like to maintain support for older GPUs