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
)
|
Signature
constructor(width: Int, height: Int, numberOfMips: Int, samplerConfig: SamplerConfig = SamplerConfig()) Parameters Returns |
SceneTexture
(
image
, samplerConfig
)
|
Signature
constructor(image: Image, samplerConfig: SamplerConfig = SamplerConfig()) Parameters
image:
Image
samplerConfig:
SamplerConfig Returns |
SceneTexture
(
bitmap
, samplerConfig
)
|
Signature
constructor(bitmap: Bitmap, samplerConfig: SamplerConfig = SamplerConfig()) Parameters
bitmap:
Bitmap
samplerConfig:
SamplerConfig Returns |
SceneTexture
(
drawable
)
| |
SceneTexture
(
color
, samplerConfig
)
|
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
()
|
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
)
|
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
)
DeprecatedUse SceneTexture constructor and SceneTexture.update instead. |
Signature
fun createFromPlatformImage(w: Int, h: Int, mips: Int, platformImage: Long, samplerConfig: SamplerConfig = SamplerConfig()): SceneTexture Parameters Returns |