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
-
Method Summary
Modifier and TypeMethodDescriptionasImage()
int
int
boolean
int
getWidth()
boolean
hasMips()
void
Load texture data from specified file name.void
loadByFd
(int fd) Load texture data from specified file descriptor.void
loadResource
(Resource res) void
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 Details
-
loadResource
-
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
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
set texture filtering mode param mode (texture_filtering_mode) -
getFilteringMode
- Returns:
- filtering mode (texture_filtering_mode)
-
asImage
- Returns:
- upcast to base type
-