Code refactoring: now rendering functions take the whole rednering engine instead of just a camera