Package playn.core
Class Texture.Config
java.lang.Object
playn.core.Texture.Config
- Enclosing class:
Texture
Used to configure texture at creation time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Texture.ConfigDefault managed texture configuration: managed, no mipmaps, no repat, linear filters.final intThe filter to use when this texture is scaled:GL_LINEARorGL_NEAREST.final booleanWhether or not texture's lifecycle is automatically managed via reference counting.final intThe filter to use when this texture is scaled:GL_LINEARorGL_NEAREST.final booleanWhether texture has mipmaps generated.final booleanWhether texture is configured to repeat in this direction.final booleanWhether texture is configured to repeat in this direction.static Texture.ConfigDefault unmanaged texture configuration: unmanaged, no mipmaps, no repat, linear filters. -
Constructor Summary
ConstructorsConstructorDescriptionConfig(boolean managed, boolean repeatX, boolean repeatY, int minFilter, int magFilter, boolean mipmaps) -
Method Summary
Modifier and TypeMethodDescriptionrepeat(boolean repeatX, boolean repeatY) Returns a copy of this config withrepeatX,repeatYset as specified.toString()inttoTexHeight(int sourceHeight) ReturnssourceHeightrounded up to a POT if necessary.inttoTexWidth(int sourceWidth) ReturnssourceWidthrounded up to a POT if necessary.
-
Field Details
-
DEFAULT
Default managed texture configuration: managed, no mipmaps, no repat, linear filters. -
UNMANAGED
Default unmanaged texture configuration: unmanaged, no mipmaps, no repat, linear filters. -
managed
public final boolean managedWhether or not texture's lifecycle is automatically managed via reference counting. If the texture will be used in anImageLayer, it should be reference counted unless you are doing something special. Otherwise you can decide whether you want to use the reference counting mechanism or not. -
repeatX
public final boolean repeatXWhether texture is configured to repeat in this direction. -
repeatY
public final boolean repeatYWhether texture is configured to repeat in this direction. -
minFilter
public final int minFilterThe filter to use when this texture is scaled:GL_LINEARorGL_NEAREST. -
magFilter
public final int magFilterThe filter to use when this texture is scaled:GL_LINEARorGL_NEAREST. -
mipmaps
public final boolean mipmapsWhether texture has mipmaps generated.
-
-
Constructor Details
-
Config
public Config(boolean managed, boolean repeatX, boolean repeatY, int minFilter, int magFilter, boolean mipmaps)
-
-
Method Details
-
repeat
Returns a copy of this config withrepeatX,repeatYset as specified. -
toTexWidth
public int toTexWidth(int sourceWidth) ReturnssourceWidthrounded up to a POT if necessary. -
toTexHeight
public int toTexHeight(int sourceHeight) ReturnssourceHeightrounded up to a POT if necessary. -
toString
-