Quite a big update today. There are still some things to fix but Sunday is over so I’ll get back to this later. Here is a list of the main changes, followed by a post explaining in detail.
- You can chose if you wish to zoom using CoreImage or OpenGL (you see squares in the background when using CoreImage)
- Created nice looking pointers for all selection tools: lasso, oval, rectangle, magic wand (and no magic wand is still not implemented)
- Selection now look much nicer and cleaner. Only 1 pixel wide (with 1 black pixel around).
- You can see both the current selection and the previous one when adding/subtracting, without glitches.
- I wrote my own cikernel for zooming and pixellating. It might be faster on some hardware than an NSAffineTransform+Pixellate
- Added support for 64 bits per pixels mode (in addition to 32 and 128)
- A lot of other fixes for either speed or stability (see changelog if you care).
Now about this OpenGL vs CoreImage thing :
CoreImage is both a joy and a big source of frustration. If you have a MacBook Pro (which will be my case soon, yay!) it’s all pretty fast. But if you have poor iBook with CPU-only CoreImage operations just like mine (for one last week) things are quite different. You can easily understand that on this hardware you have to wait for filters to update… but it’s not only slow when filtering.
Just zooming and pixellating is slow on my iBook! Using a NSAffineTransform + Pixellate just takes all the CPU making all the other operations (lasso selection for example) lag like hell. Sadly you have to zoom and pixellate all the time in such kind of application. The solution I had found in the very early versions of ChocoFlop was to render on OpenGL Textures. These could easily be panned /zoomed around with pixellation and it is a very fast technique for final display.
Later I realized that doing this implied copying the image to the main memory. In the case of a GPU accelerated machine this simply *kills* the performance since all the data being processed in the GPU has to go back to the CPU (and back again). For some time I went all CoreImage. But now that I am going to part with my beloved iBook for a much more powerful machine I decided to do what I could to make the experience on lower machines at least pleasant, if not amazing like on more powerful hardware. So from now on you can chose between zooming with CoreImage and zooming with OpenGL. If your machine does not support pixel shaders it will default to OpenGL textures otherwise CoreImage will be used. You can easily tell which mode you’re using. If you’re in 100% CoreImage mode you’ll see squares in the background (outside of the image). You can force one mode or another from the ‘technical’ tab in the prefs.
It is still not perfect though… converting to OpenGL textures takes some time, and you’ll soon see a message while updating textures. So if you can upgrade your graphics cards, do it! But at least with this OpenGL mode you can draw with your lasso when zoomed and there’s no lag.
So update, and have fun!