Implement CPU rendering with texture upload on the renderer side.

r? @metajack