1

I use matlab to render a complex mesh (using trimesh, material, camlight, view...) and need not display it to the user, just to get the rendered image. This is discussed in another question.

Using any of the suggested solutions (save-as image, saving into a video object, and using undocumented hardcopy) is very slow (~1sec), especially compared to rendering the plot itself, including painting on the screen takes less than 0.5sec.

I believe it is caused by hardcopy method not to utilize the GPU, while rendering the original plot for display do use the GPU; using GPU-Z monitor software I see the GPU working during ploting but not during hardcopy.

The figure use 'opengl' as renderer, but hardcopy, which is the underlying implementation of all the suggested methods, don't seem to respect this...

Any suggestion on how to configure it to use the GPU?

EDITED: following this thread I've moved to use the following, but GPU usage is still a flatliner.

  cdata=hardcopy(f, '-Dopengl', '-r0')
Community
  • 1
  • 1
Uri Cohen
  • 3,488
  • 1
  • 29
  • 46

0 Answers0