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
Modifier and TypeFieldDescriptionstatic Texture.Config
Default managed texture configuration: managed, no mipmaps, no repat, linear filters.final int
The filter to use when this texture is scaled:GL_LINEAR
orGL_NEAREST
.final boolean
Whether or not texture's lifecycle is automatically managed via reference counting.final int
The filter to use when this texture is scaled:GL_LINEAR
orGL_NEAREST
.final boolean
Whether texture has mipmaps generated.final boolean
Whether texture is configured to repeat in this direction.final boolean
Whether texture is configured to repeat in this direction.static Texture.Config
Default unmanaged texture configuration: unmanaged, no mipmaps, no repat, linear filters. -
Constructor Summary
ConstructorDescriptionConfig
(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
,repeatY
set as specified.toString()
int
toTexHeight
(int sourceHeight) ReturnssourceHeight
rounded up to a POT if necessary.int
toTexWidth
(int sourceWidth) ReturnssourceWidth
rounded 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_LINEAR
orGL_NEAREST
. -
magFilter
public final int magFilterThe filter to use when this texture is scaled:GL_LINEAR
orGL_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
,repeatY
set as specified. -
toTexWidth
public int toTexWidth(int sourceWidth) ReturnssourceWidth
rounded up to a POT if necessary. -
toTexHeight
public int toTexHeight(int sourceHeight) ReturnssourceHeight
rounded up to a POT if necessary. -
toString
-