Re-write to support 3D rendering

Signed-off-by: ShadowChild <shadychild12@gmail.com>