Dispose texture and geometry can be optional