package Ġio . github . scene view . render able Ċ Ċ import Ġandroidx . lifecycle . Lifecycle Ċ import Ġcom . google . android . fil ament . VertexBuffer Ċ import Ġcom . gor isse . th omas . lifecycle . observe Ċ import Ġio . github . scene view . Fil ament Ċ import Ġjava . nio . Buffer Ċ Ċ fun ĠVertex Buffer . Builder . build ( lifecycle : ĠLifecycle ? Ġ= Ġnull ): ĠVertex Buffer Ġ= Ġbuild ( Fil ament . engine ) ĊĠĠĠ Ġ. also Ġ{ Ġvertex Buffer Ġ-> ĊĠĠĠĠĠĠĠ Ġlifecycle ?. observe ( on Destroy Ġ= Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠPrevent Ġdouble Ġdestroy Ġin Ġcase Ġof Ġmanually Ġdestroyed ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrun Catch ing Ġ{ Ġvertex Buffer . destroy () Ġ} ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ Ċ fun ĠVertex Buffer . set Buffer At ( buffer Index : ĠInt , Ġbuffer : ĠBuffer ) Ġ= ĊĠĠĠ Ġset Buffer At ( Fil ament . engine , Ġbuffer Index , Ġbuffer ) Ċ Ċ fun ĠVertex Buffer . set Buffer At ( buffer Index : ĠInt , Ġbuffer : ĠBuffer , Ġdest Offset InBytes : ĠInt , Ġcount : ĠInt ) Ġ= ĊĠĠĠ Ġset Buffer At ( Fil ament . engine , Ġbuffer Index , Ġbuffer , Ġdest Offset InBytes , Ġcount ) Ċ Ċ fun ĠVertex Buffer . destroy () Ġ= ĠFil ament . engine . destroy VertexBuffer ( this )