/** * Returns, creating if necessary, this image's default texture. When the texture is created, it * will use the {@link Texture.Config} set via {@link #setConfig}. If an image's default texture * is {@link Texture#close}d, a subsequent call to this method will create a new default texture. */ public Texture texture () { if (texture == null || texture.disposed()) texture = createTexture(texconf); return texture; }
/** * Returns, creating if necessary, this image's default texture. When the texture is created, it * will use the {@link Texture.Config} set via {@link #setConfig}. If an image's default texture * is {@link Texture#close}d, a subsequent call to this method will create a new default texture. */ public Texture texture () { if (texture == null || texture.disposed()) texture = createTexture(texconf); return texture; }
/** * Updates this image's default texture with the current contents of the image, and returns the * texture. If the texture has not yet been created, then this simply creates it. This is only * necessary if you want to update the default texture for an image associated with a {@link * Canvas}, or if you have used {@link #setRgb} to change the contents of this image. */ public Texture updateTexture () { if (texture == null || texture.disposed()) texture = createTexture(texconf); else texture.update(this); return texture; }
/** * Updates this image's default texture with the current contents of the image, and returns the * texture. If the texture has not yet been created, then this simply creates it. This is only * necessary if you want to update the default texture for an image associated with a {@link * Canvas}, or if you have used {@link #setRgb} to change the contents of this image. */ public Texture updateTexture () { if (texture == null || texture.disposed()) texture = createTexture(texconf); else texture.update(this); return texture; }