Skip to content

UniformLayout

enum UniformLayout
Package: dev.joid.lib.bridge.render.shader.source · Module: core · Source: UniformLayout.java

How a translated program declares its uniforms, in one std140 block or one by one.

A backend chooses it when it creates its GlslShaderTranslator. In both layouts, the Shader keeps the values in the same UniformBlock; only the way the backend sends them changes.

Backend note: the OpenGL backends use LOOSE, Vulkan uses BLOCK.

ValueSummary
BLOCKDeclares every uniform in one std140 block; the backend packs it with UniformBlock.pack and sends the whole buffer.
LOOSEDeclares each uniform on its own; the backend sends each changed member with UniformBlock.upload.

BLOCK

Declares every uniform in one std140 block; the backend packs it with UniformBlock.pack and sends the whole buffer. It needs a dialect with uniform blocks.

LOOSE

Declares each uniform on its own; the backend sends each changed member with UniformBlock.upload. It works in every dialect.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page