MATLAB Answers

drawnow() and "Warning: Texture data too large for graphics device. Fitting to max size available.."

4 views (last 30 days)
Doug
Doug on 17 Oct 2013
Answered: Clemens on 14 Apr 2014
I have a GUI with two axes and a textbox. The axes are updated with new data about every 4 seconds with signal data. The initial plotting in both axes is performed with imagesc(); afterwards they are updated by directly editing the 'cdata' element. The textbox is updated with data every so often and for some reason the author has included a drawnow().
When drawnow() is called, I get the following warning: "Warning: Texture data too large for graphics device. Fitting to max size available.."
This warning does not occur when I initially plot the data in the axes or when the data is updated. It only occurs with the drawnow().
FWIW, this seems to happen when running Matlab in Linux (Ubuntu 12.04); I have yet to see it occur when running Matlab in Windows -- however there are enough additional differences between the two configurations that I can't directly conclude that this is a Linux issue.
What is the source of this error? I have seen this in a few discussion boards and questions, but I haven't found a detailed answer yet. Any clues? I've seen some references to this being a rendering issue but it would be helful to know the underlying cause.
Thanks!

Answers (1)

Clemens
Clemens on 14 Apr 2014
Hi,
In my case, the OpenGL Texture Size is too small.
Type: opengl info
Version = 1.1.0 Vendor = Microsoft Corporation Renderer = GDI Generic MaxTextureSize = 1024 Visual = 33 (RGB 32 bits(08 08 08 00) zdepth 32, Generic, Opengl, Double Buffered, Window) Software = true # of Extensions = 3
1024 wasn't enough for me. Various solutions: Use hardware by typing: opengl hardware
Check again about the size.
- update your graphic driver.
Sadly this didn't fix it either, came to a weird bug. http://www.mathworks.de/matlabcentral/newsreader/view_thread/328141

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!