Added material support. We need a resoruce manager now, before we can render the textures.