I want to vary the colour of the line along it's length. My code below produces lines with uniform colour. I assume it just uses the colour resulting from the first stroke().
Any way to do this with standard Processing rendering (apart from splitting into different shapes, which is too inefficient)?
noFill();
strokeWeight(1.f);
beginShape();
for(PVector pv : points) // Points is a LinkedList<PVector>.
I want a tightly fitted bounding rectangle for my RiText objects.
The rectangle returned by RiText.getBoundingBox() method is very loosly fitted, with some fonts it is roughly twice the height it needs to be for given RiText objects.
I thought of using the RiText.textHeight() method, but it seems to misbehave a bit. It reports the same height regardless of what RiText.textSize() has been set. Oddly, RiText.textWidth() does report the correct width in response to changes in textSize.
I've tried nexttext as well, which does have a tight bounding box, but suffers from other problems. I'm almost at the point where I'm going to abandon these libs (which are otherwise great!) and just roll my own solution for this project, as I just can't seem to get them to do quite what I need.
I'm having trouble running my OpenGL sketch in an applet. Regular execution it works fine. If I switch it to P3D it works in an applet. With the opengl renderer selected, Chome says "This browser does not have a Java Plug-in.", while in firefox it says "Class not found: <my sketch name>".
Also, does anyone know if it's possible to use the GLGraphics library from within an applet? Specifically I want to run GLSL shaders from within an applet.
Thanks a bunch for any help - I've searched around a bit for answers to these but could only find vague information so I thought I'd just ask.