Class GlUtil.Uniform
- java.lang.Object
-
- com.google.android.exoplayer2.util.GlUtil.Uniform
-
- Enclosing class:
- GlUtil
public static final class GlUtil.Uniform extends Object
GL uniform, which can be attached to a sampler usingsetSamplerTexId(int, int).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind()Sets the uniform to whatever value was passed viasetSamplerTexId(int, int),setFloat(float)orsetFloats(float[]).voidsetFloat(float value)Configuresbind()to use the specified floatvaluefor this uniform.voidsetFloats(float[] value)Configuresbind()to use the specified float[]valuefor this uniform.voidsetSamplerTexId(int texId, int unit)Configuresbind()to use the specifiedtexIdfor this sampler uniform.
-
-
-
Field Detail
-
name
public final String name
The name of the uniform in the GLSL sources.
-
-
Constructor Detail
-
Uniform
public Uniform(String name, int location, int type)
Creates a new uniform.
-
-
Method Detail
-
setSamplerTexId
public void setSamplerTexId(int texId, int unit)Configuresbind()to use the specifiedtexIdfor this sampler uniform.- Parameters:
texId- The GL texture identifier from which to sample.unit- The GL texture unit index.
-
setFloat
public void setFloat(float value)
Configuresbind()to use the specified floatvaluefor this uniform.
-
setFloats
public void setFloats(float[] value)
Configuresbind()to use the specified float[]valuefor this uniform.
-
bind
public void bind()
Sets the uniform to whatever value was passed viasetSamplerTexId(int, int),setFloat(float)orsetFloats(float[]).Should be called before each drawing call.
-
-