I'm porting a sketch from Processing 1.5.1 to Processing 2.0b8 in Java mode but I'm struggling to get text to appear on the screen either with the P2D or P3D rendering mode (even with a simple sketch like the one below): If I use anything other than the default renderer in the size() command then no fonts appear on the screen. The problem affects fonts in the ControlP5 library too. None of the options in the trusty textMode() command seem to help. What should I do to get fonts to appear in anything other than the default renderer?
I've been building a sketch with the OpenGL library. I've added a button on the sketch to output a PDF image of what's on the screen (using the PDF library and the beginRaw/endRaw facility). It works okay but I've found that if I'm drawing polygons with beginShape() ...vertex()...endShape(CLOSE) etc. and I fill those polygons with some colour that has some arbitrary value of alpha (i.e. not 0 or 255) then very fine straight dark lines appear in the filled polygons on the PDF output but not on the screen.
Can anyone advise how I might eliminate those lines?
You can see an example in the map of North America below that I've built from polygons (fyi, I've used map data from naturalearthdata.com)
I'm building a relatively elaborate sketch consisting of a few hundred shapes (using beginShape/EndShape) with some underlying data structures (objects, arrays, ArrayLists etc.) supported by some mouse-click interaction. It's all in 2D - no fancy 3D. It's now getting sufficiently large that it's running quite slow and the mouse response is a bit sluggish (I'm using a quad Core Intel running Windows 7 64bit). I'm keen to give it to a few people so I'm concerned that it might be slow on other PCs - especially laptops. To speed things up I've removed most of the calculation from repeated traversals through the draw() method and changed as many floats to ints as I can.
I'm using PFont/LoadFont for the text. I am drawing my graphics onto the screen in overlapping layers with some alpha to allow some things to show through but I'm only using two dimensions x and y to locate things on the screen. There is a bit of pushMatrix()/popMatrix() rotation but it's not the bulk of the sketch. I'm using rev 1.2.1.
Using the default renderer it looks beautiful and crisp but it's slow. Switching to openGL makes it look ugly but it runs fantastically fast - the text is smeared, the lines look stippled but the mouse response is great. P3D is both ugly and slow, P2D isn't much better than openGL.
Can anyone recommend either:
1) some guidelines for avoiding ugly openGL artifacts especially for text and lines
or
2) some hints as to how to render quicker with the default renderer