public static enum Texture.WrapMode extends Enum<Texture.WrapMode>
Enum Constant and Description |
---|
CLAMP_NOT_NEEDED
CLAMP_NOT_NEEDED is used for applications where the caller knows
that the texture will never be sampled outside the center of the
first and last pixels in the content area of the texture.
|
CLAMP_TO_EDGE
CLAMP_TO_EDGE is used for applications where the area outside of
the defined pixels should be clamped to the value of (the center
of) the edge pixels.
|
CLAMP_TO_EDGE_SIMULATED
This value can be returned from the
Texture.getWrapMode() method
if the caller asked for CLAMP_TO_EDGE and the mode was
not supported by the hardware (due to the content area not fitting
tightly into the physical dimensions along one or both axes). |
CLAMP_TO_ZERO
CLAMP_TO_ZERO is used for applications where the area outside of
the defined pixels should interpolate from the edge pixel values
at the center of those edge pixels to fully transparent at the
center of the pixels just outside the content area, and then
remain fully transparent out to +/- infinity.
|
CLAMP_TO_ZERO_SIMULATED
This value can be returned from the
Texture.getWrapMode() method
if the caller asked for CLAMP_TO_ZERO and the mode was
not supported by the hardware (via GL_CLAMP_TO_BORDER for instance)
so a guard row of transparent pixels was included surrounding all
4 sides of the content area. |
REPEAT
REPEAT is used for applications where the pixels should be
repeated from edge to edge as per the GL_REPEAT mode.
|
REPEAT_SIMULATED
This value can be returned from the
Texture.getWrapMode() method
if the caller asked for REPEAT and the mode was not
supported by the hardware (due to the content area not fitting
tightly into the physical dimensions along one or both axes). |
Modifier and Type | Method and Description |
---|---|
boolean |
isCompatibleWith(Texture.WrapMode requestedMode) |
Texture.WrapMode |
simulatedVersion() |
static Texture.WrapMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Texture.WrapMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Texture.WrapMode CLAMP_NOT_NEEDED
public static final Texture.WrapMode CLAMP_TO_ZERO
public static final Texture.WrapMode CLAMP_TO_EDGE
public static final Texture.WrapMode REPEAT
public static final Texture.WrapMode CLAMP_TO_ZERO_SIMULATED
Texture.getWrapMode()
method
if the caller asked for CLAMP_TO_ZERO
and the mode was
not supported by the hardware (via GL_CLAMP_TO_BORDER for instance)
so a guard row of transparent pixels was included surrounding all
4 sides of the content area.
The content coordinates will indicate the proper region to render
just the "true" content of the texture, but samples outside of
that area should accurately return fully transparent pixels if
they are included in the sampled areas.public static final Texture.WrapMode CLAMP_TO_EDGE_SIMULATED
Texture.getWrapMode()
method
if the caller asked for CLAMP_TO_EDGE
and the mode was
not supported by the hardware (due to the content area not fitting
tightly into the physical dimensions along one or both axes).
The resulting content will be packed tightly into the upper left
corner of the resulting texture and a copy of the last row and
column of pixels will be duplicated so that the samples from 0,0
to the content width and height will all return the correctly
clamped values, however sampling more than half a pixel past
the content width and height will not necessarily return clamped
values. If the application needs the clamped values to be returned
out to +infinity on either the X or Y axis, then it should make
alternate arrangements to ensure that the data is fully padded to
the physical dimensions of the texture (currently only needed to
support NO_CYCLE gradients and the Rectangle Wrap texture, both of
which adjust for this limitation).public static final Texture.WrapMode REPEAT_SIMULATED
Texture.getWrapMode()
method
if the caller asked for REPEAT
and the mode was not
supported by the hardware (due to the content area not fitting
tightly into the physical dimensions along one or both axes).
The resulting content will be packed tightly into the upper left
corner of the resulting texture and a copy of the first row and
column of pixels will be duplicated and placed after the last
row and column so that samples from between the center of the
last row and column of pixels to the center of the next row or
column after that will interpolate back to the left or top edge
of the image. The application should shift the texture coordinates
and restrict their access to texture coordinates in the range
[HALF_TEXEL, content_size+HALF_TEXEL] which will represent exactly
one whole cell of the infinite field of repeating copies of the
image, though shifted by half a texel in position.public static Texture.WrapMode[] values()
for (Texture.WrapMode c : Texture.WrapMode.values()) System.out.println(c);
public static Texture.WrapMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Texture.WrapMode simulatedVersion()
public boolean isCompatibleWith(Texture.WrapMode requestedMode)
Copyright © 2020. All rights reserved.