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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFired when samplers are resolved to capture the current bindings. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidApplies theRenderSystemtextures toSampler0-Sampler11.voidaddSampler(CharSequence name, int textureId) Adds a texture that is dynamically bound and sets texture units.voidAdds a listener for sampler updates.default intapplyShaderSamplers(int sampler) Loads the samplers set byaddSampler(CharSequence, int)into the shader.intapplyShaderSamplers(ShaderTextureSource.Context context, int sampler) Loads the samplers set byaddSampler(CharSequence, int)into the shader.voidClears all samplers.voidremoveSampler(CharSequence name) Removes the specified sampler binding.voidRemoves a listener from sampler updates.default voidsetFramebufferSamplers(AdvancedFbo framebuffer) SetsDiffuseSampler0-DiffuseSamplerMaxto the color buffers in the specified framebuffer.
-
Method Details
-
addRenderSystemTextures
default void addRenderSystemTextures()Applies theRenderSystemtextures toSampler0-Sampler11. -
setFramebufferSamplers
SetsDiffuseSampler0-DiffuseSamplerMaxto 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 ornullto ignore normal samplerssampler- The sampler to start binding to- Returns:
- The next available sampler
-
clearSamplers
void clearSamplers()Clears all samplers.
-