draw only a single color in GL and trouble rendering to matrix

prismspecs's icon

Hey there,
Two problems.
One, I have this patch drawing the attack function and base waveform of a midi note. I want only their overlap to be drawn. Check the patch below:

Max Patch
Copy patch and select New From Clipboard in Max.

Second question, I figure if I had it in a matrix my job would be easier given that I don't know too much about GL. Just can't get it to render to matrix, why is that?