I have been working for a few years now with OF. It is really great, and we almost are able to do anything with it…
But i have two main problems with OF that i can not solve, and perhaps there is a good/simple solution.
The first is that drawing, say approx. 100 shapes (rectangles for example) makes the CPU (in my macbook pro from 2006) go to 70%. Using other apps, i can manipulate video, text, sound, etc. making intensive effects, having only around 50% of consumption. This difference is really huge. Only drawing a few shapes seems more intensive than extremely complicated loops, video rendering, math, sound, etc.
In my OF projects I have to use fbos, and only update them when a shape changes…
does anybody has the same problem?
is it because of my computer?
is it a “normal” problem?
any tricks to avoid that ?
The other problem is that fonts and shapes do not display in a smooth and antialiased way. I know all the workarounds that were pointed here (i think so), but none of them worked completely. With other programs (processng, etc.) i get perfect smoothness from the beginning.
This is really annoying, and if somebody has any suggestion about it, please tell me.
thanks for the replay.
Yes, i tried (in some projects) the code you show, and it works for some drawings. Still small fonts are not great when rotated, etc.
Also the problem with that code is that t depends on the gpu. Also for windows, it must be different and issues can come…
The second question you make, nop, i did not do that (as far as i remember, cause i tried so many things…). I will give it a try. Thanks.
Any idea about the huge cpu load, or other solutions to smooth?
Not sure about the cpu load, it could depend on the code used to render the shapes.
I tried this draw code in an empty example drawing 1000 rects and am using < 5% cpu on my MacBook Pro 2.6 GHz Intel Core i7.
actually antialiasing is now enabled by default so using the glut string won’t have any effect.
also the antialiasing for fonts and shapes happens in different places. for fonts the antialiasing that you could enable with the glut string and is now enabled by default, won’t have any effect since fonts are drawed as bitmaps.
it seems like there are fonts that work better than others with the library we use for rendering fonts (freetype). for example the default helvetica in osx doesn’t work very well with small sizes.
also posting an image of the results you get in OF and processing would help.