public interface TextureSource
Supplies and updates the texture rendered by a
Media360View, enabling
dynamic content such as procedural animations - and, once a platform path
from media frames to GPU textures exists, 360 video. All methods run on
the render thread.Methods
Method details
createTexture
public abstract Texture createTexture(GraphicsDevice device)Creates the texture. Invoked once on the render thread after the GPU
context is ready.
Parameters
deviceGraphicsDevice- the graphics device bound to the view
Returns
the texture to map onto the sphere
updateTexture
public abstract boolean updateTexture(GraphicsDevice device, Texture texture)Invoked once per frame before drawing. Update the texture contents
here and return true when they changed (so continuous sources keep the
view animating).
Parameters
deviceGraphicsDevice- the graphics device bound to the view
textureTexture- the texture returned by
#createTexture(GraphicsDevice)
Returns
true when the texture contents changed this frame
dispose
public abstract void dispose(GraphicsDevice device)Invoked when the view tears down. Release anything the source owns;
the texture itself is disposed by the view.
Parameters
deviceGraphicsDevice- the graphics device bound to the view