stdcubic sdw but optimized depth map drawing and included endian check