natiny_texture_create

C
NatinyTexture natiny_texture_create(NatinyResource resource);

Creates a texture from an image resource.

Parameters

Name Type Description
resource NatinyResource Resource handle containing encoded image data

Returns

Type Description
NatinyTexture Texture handle, or 0 when the resource is invalid, image decoding fails, or allocation fails

Example

C
NatinyTexture texture = natiny_texture_create(image_resource);

Notes

  • Image data is copied, so the resource can be destroyed after this call.