Interface TextureUniformAccess
- All Known Subinterfaces:
ShaderProgram
- All Known Implementing Classes:
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
Applies theRenderSystem
textures toSampler0
-Sampler11
.void
addSampler
(CharSequence name, int textureId) Adds a texture that is dynamically bound and sets texture units.void
Adds a listener for sampler updates.default int
applyShaderSamplers
(int sampler) Loads the samplers set byaddSampler(CharSequence, int)
into the shader.int
applyShaderSamplers
(ShaderTextureSource.Context context, int sampler) 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
-
addRenderSystemTextures
default void addRenderSystemTextures()Applies theRenderSystem
textures toSampler0
-Sampler11
. -
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
-
removeSampler
Removes the specified sampler binding.- Parameters:
name
- The name of the sampler to remove
-
applyShaderSamplers
default int applyShaderSamplers(int sampler) Loads the samplers set byaddSampler(CharSequence, int)
into the shader.- Parameters:
sampler
- The sampler to start binding to- Returns:
- The next available sampler
-
applyShaderSamplers
Loads the samplers set byaddSampler(CharSequence, int)
into the shader.- Parameters:
context
- The context for setting built-in shader samplers ornull
to ignore normal samplerssampler
- The sampler to start binding to- Returns:
- The next available sampler
-
clearSamplers
void clearSamplers()Clears all samplers.
-