open fun setTime(time: Float): Unit
Sets the time value that is used in the shaders to create animated effects.
public class MyRenderer extends Renderer
{
private double mStartTime;
private Material mMyMaterial;
protected void initScene() {
mStartTime = SystemClock.elapsedRealtime();
...
}
public void onDrawFrame(GL10 glUnused) {
super.onDrawFrame(glUnused);
mMyMaterial.setTime((SystemClock.elapsedRealtime() - mLastRender) / 1000d);
...
}
time
- Float:
open fun setTime(time: Float): Unit
Sets the time value that is used in the shaders to create animated effects.
public class MyRenderer extends Renderer
{
private double mStartTime;
private Material mMyMaterial;
protected void initScene() {
mStartTime = SystemClock.elapsedRealtime();
...
}
public void onDrawFrame(GL10 glUnused) {
super.onDrawFrame(glUnused);
mMyMaterial.setTime((SystemClock.elapsedRealtime() - mLastRender) / 1000d);
...
}
time
- Float: