I am converting arbitrary texts to Jitter matrices in order to load them into my OpenGL context as textures. This has been necessary because rendering multiple texts into an OpenGL scene using jit.gl.text2d and jit.gl.text3d objects proved to be a significant performance drain. The technique I am using is discussed in detail here.
The technique works fine and has been tested on several modern iMacs, running Lion & Snow Leopard, 4-8GB memory on >2.5GHz Intel Core i5s, using Max/MSP 5.1.9.
I've now run into problems when running on an older MacBook (4.1) running at 2.1GHz with only 2GB memory (OS: 10.5.8, also Max/MSP 5.1.9). Shorter strings of text still render fine, but with longer strings the texture generated appears to be based on a Jitter matrix with all cells set to [1,1,1,1] (ie, a rectangle filled with white).
I suspect this is a memory issue. In any case, the Max window on the MacBook is displaying 'ob3d_draw_end popmatrix: GL Error: invalid value' error messages that I don't see on my higher spec machines.
So, is there a way to detect this error condition from inside js code?
I can build a small example patch and js to demonstrate the issue, but the project I am developing is quite large (>8MB of .maxpats, >1MB .js code) and stripping it down will take a while. In the meantime I am hoping that the description above may be sufficiently detailed for one of the JS/Jitter brains reading to provide some comment.