MATLAB: Is the WARP command unable to display the expected texture mapped surface on Windows when using MATLAB 7.0 (R14)

2000MATLABpainterstexture-mapwarpwindows

I run the following code on a Windows machine:
[x,y,z] = cylinder;
I = imread('testpat1.png');
warp(x,y,z,I);
This does not yield the expected texture mapped surface.

Best Answer

This limitation is the result of a renderer issue on the Windows platform .The WARP command generates this result when the renderer is set to "Painters".
To work around this issue, set the renderer to ''OpenGL'' or "Zbuffer". The example below shows how to set the renderer to OpenGL:
close all
set(gcf,'Renderer','OpenGL');
[x,y,z] = cylinder;
I = imread('testpat1.png');
warp(x,y,z,I);