Fix stride related bug in Canvas immediate API
Add test case for 3D geometries in immediate API