Пример #1
0
SGMask* SG_EXPORT sgMaskCreateFile2i(const char* fname, SGint xoffset, SGint yoffset)
{
	SGTexture* texture = sgTextureCreateFile(fname);
	if(texture == NULL)
		return NULL;

	SGMask* mask = sgMaskCreateTexture2i(texture, xoffset, yoffset);
	sgTextureDestroy(texture);
	
	return mask;
}
Пример #2
0
void SG_CALL sgAtlasDestroy(SGAtlas* atlas)
{
    if(!atlas)
        return;

    size_t i;
    for(i = 0; i < atlas->numtextures; i++)
    {
        if(atlas->textures[i].owner)
            sgTextureDestroy(atlas->textures[i].texture);
        _sgAtlasNodeDestroy(atlas->textures[i].root);
    }
    free(atlas->textures);
    free(atlas);
}