LargeTexture

Inherits: Texture2D < Texture < Resource < Reference < Object

A Texture2D capable of storing many smaller textures with offsets.

Description

A Texture2D capable of storing many smaller textures with offsets.

You can dynamically add pieces (Texture2Ds) to this LargeTexture using different offsets.

Methods

int

add_piece ( Vector2 ofs, Texture2D texture )

void

clear ( )

int

get_piece_count ( ) const

Vector2

get_piece_offset ( int idx ) const

Texture2D

get_piece_texture ( int idx ) const

void

set_piece_offset ( int idx, Vector2 ofs )

void

set_piece_texture ( int idx, Texture2D texture )

void

set_size ( Vector2 size )

Method Descriptions

Adds texture to this LargeTexture, starting on offset ofs.


  • void clear ( )

Clears the LargeTexture.


  • int get_piece_count ( ) const

Returns the number of pieces currently in this LargeTexture.


Returns the offset of the piece with the index idx.


Returns the Texture2D of the piece with the index idx.


Sets the offset of the piece with the index idx to ofs.


Sets the Texture2D of the piece with index idx to texture.


Sets the size of this LargeTexture.