Package com.banuba.sdk.scene
Interface Texture
-
- All Known Implementing Classes:
Texture.CppProxy
public interface Texture
Class, which repesent 2D texture interface. Subclass of image
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Texture.CppProxy
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Image
asImage()
TextureFilteringMode
getFilteringMode()
int
getHeight()
int
getLayers()
boolean
getTiling()
int
getWidth()
boolean
hasMips()
void
load(java.lang.String fileName)
Load texture data from specified file name.void
loadByFd(int fd)
Load texture data from specified file descriptor.void
loadResource(Resource res)
void
setFiltering(TextureFilteringMode type)
set texture filtering mode param mode (texture_filtering_mode)void
setMips(boolean enable)
set mimpap generation flag.void
setTiling(boolean enable)
enable/disable texture tiling
-
-
-
Method Detail
-
loadResource
void loadResource(@Nullable Resource res)
-
loadByFd
void loadByFd(int fd)
Load texture data from specified file descriptor.- Parameters:
fd
- (i32): file descriptor, should be closed on the caller side.
-
load
void load(@NonNull java.lang.String fileName)
Load texture data from specified file name. For now only supported .png, .jpeg, .jpg, .ktx (2d) images.- Parameters:
fileName
- (string): absolute path for image file
-
getWidth
int getWidth()
- Returns:
- width (int) of loaded image
-
getHeight
int getHeight()
- Returns:
- height (int) of loaded image
-
getLayers
int getLayers()
- Returns:
- channels count of loaded image (R, RG, RGBA, i.e. 1, 2, or 4).
-
setMips
void setMips(boolean enable)
set mimpap generation flag. (affect only on ogl backend).- Parameters:
enable
- (bool): mipmap generation enable flag.
-
hasMips
boolean hasMips()
- Returns:
- flag (bool) : mimpap generation flag
-
setTiling
void setTiling(boolean enable)
enable/disable texture tiling- Parameters:
enable
- (bool): tiled wrapping flag
-
getTiling
boolean getTiling()
- Returns:
- tiled texture wrapping flag (bool).
-
setFiltering
void setFiltering(@NonNull TextureFilteringMode type)
set texture filtering mode param mode (texture_filtering_mode)
-
getFilteringMode
@NonNull TextureFilteringMode getFilteringMode()
- Returns:
- filtering mode (texture_filtering_mode)
-
asImage
@Nullable Image asImage()
- Returns:
- upcast to base type
-
-