Rewrite of renderer to be less deprecated.
Next commit will make it work and introduce shaders.
TODO: remove all deprecation in rendering.