natiny_surface_get_texture

C
NatinyTexture natiny_surface_get_texture(NatinySurface surf);

Returns the surface's color attachment as a texture handle.

The handle stays valid until the surface is destroyed - or until a resize, which replaces the attachment, after which this has to be asked again.

Parameters

Name Type Description
surf NatinySurface Surface handle

Returns

Type Description
NatinyTexture Texture handle, or 0 if the surface is not valid

Example

C
NatinyTexture texture = natiny_surface_get_texture(surface);