- rewrote a little bit the state magagement to remove the RenderState