Interface TextureUniformAccess
- All Known Subinterfaces:
ShaderProgram
- All Known Implementing Classes:
DynamicShaderProgramImpl
,ShaderProgramImpl
public interface TextureUniformAccess
Provides write access to all textures in a shader program.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Fired when samplers are resolved to capture the current bindings. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
addSampler
(CharSequence name, int textureId) Adds a texture that is dynamically bound and sets texture units.void
addSampler
(CharSequence name, int textureId, int samplerId) Adds a texture that is dynamically bound and sets texture units.void
Adds a listener for sampler updates.default void
bindSamplers
(int samplerStart) Loads the samplers set byaddSampler(CharSequence, int)
into the shader.void
bindSamplers
(ShaderTextureSource.Context context, int samplerStart) Loads the samplers set byaddSampler(CharSequence, int)
into the shader.void
Clears all samplers.void
removeSampler
(CharSequence name) Removes the specified sampler binding.void
Removes a listener from sampler updates.default void
setFramebufferSamplers
(AdvancedFbo framebuffer) SetsDiffuseSampler0
-DiffuseSamplerMax
to the color buffers in the specified framebuffer.
-
Method Details
-
setFramebufferSamplers
SetsDiffuseSampler0
-DiffuseSamplerMax
to the color buffers in the specified framebuffer.- Parameters:
framebuffer
- The framebuffer to bind samplers from
-
addSamplerListener
Adds a listener for sampler updates.- Parameters:
listener
- The listener instance
-
removeSamplerListener
Removes a listener from sampler updates.- Parameters:
listener
- The listener instance
-
addSampler
Adds a texture that is dynamically bound and sets texture units.- Parameters:
name
- The name of the texture to settextureId
- The id of the texture to bind and assign a texture unit
-
addSampler
Adds a texture that is dynamically bound and sets texture units.- Parameters:
name
- The name of the texture to settextureId
- The id of the texture to bind and assign a texture unitsamplerId
- The id of the sampler assign a texture unit
-
removeSampler
Removes the specified sampler binding.- Parameters:
name
- The name of the sampler to remove
-
bindSamplers
default void bindSamplers(int samplerStart) Loads the samplers set byaddSampler(CharSequence, int)
into the shader.- Parameters:
samplerStart
- The sampler to start binding to
-
bindSamplers
Loads the samplers set byaddSampler(CharSequence, int)
into the shader.- Parameters:
context
- The context for setting built-in shader samplers ornull
to ignore normal samplerssamplerStart
- The sampler to start binding to
-
clearSamplers
void clearSamplers()Clears all samplers.
-