SceneTexture(getDrawable(R.drawable.myDrawable)) // Creating a SceneTexture from drawable in resources SceneTexture(Color.valueOf(Color.BLACK)) // Creating a plain black SceneTexture
class SceneTexture
SceneTexture
(
width
,
height
,
numberOfMips
,
samplerConfig
)
:
SceneTexture |
Signature
constructor(width: Int, height: Int, numberOfMips: Int, samplerConfig: SamplerConfig = SamplerConfig()) Parameters Returns |
SceneTexture
(
image
,
samplerConfig
)
:
SceneTexture |
Signature
constructor(image: Image, samplerConfig: SamplerConfig = SamplerConfig()) Parameters
image:
Image
samplerConfig:
SamplerConfig Returns |
SceneTexture
(
bitmap
,
samplerConfig
)
:
SceneTexture |
Signature
constructor(bitmap: Bitmap, samplerConfig: SamplerConfig = SamplerConfig()) Parameters
bitmap:
Bitmap
samplerConfig:
SamplerConfig Returns |
SceneTexture
(
drawable
)
:
SceneTexture | |
SceneTexture
(
color
,
samplerConfig
)
:
SceneTexture |
Signature
constructor(color: Color, samplerConfig: SamplerConfig = SamplerConfig()) Parameters
color:
Color
samplerConfig:
SamplerConfig Returns |
handle
:
Long
[Get] |
Signature
var handle: Long |
destroy
()
|
Signature
fun destroy() |
nativeHandle
()
:
Long
|
Signature
fun nativeHandle(): Long Returns
Long
|
update
(
buffer
,
width
,
height
,
strideInBytes
)
|
Updates the texture with new data.
Signature
fun update(buffer: ByteBuffer, width: Int, height: Int, strideInBytes: Int) Parameters
buffer:
ByteBuffer
width:
Int
height:
Int
strideInBytes:
Int
|
calculateMips
(
w
,
h
)
:
Int
|
Calculates the number of mipmap levels for a texture of the given dimensions.
Mipmaps are smaller versions of a texture used for rendering at different distances, which improves rendering quality and performance.
Signature
fun calculateMips(w: Int, h: Int): Int Parameters
w:
Int
h:
Int
Returns
Int
|
createFromPlatformImage
(
w
,
h
,
mips
,
platformImage
,
samplerConfig
)
:
SceneTexture |
Signature
fun createFromPlatformImage(w: Int, h: Int, mips: Int, platformImage: Long, samplerConfig: SamplerConfig = SamplerConfig()): SceneTexture Parameters Returns |