@makalele wrote:
Hi, I'm interested in some type of engine that allows to draw high-performance primitives in cocos2d-x, but it also have to give an access to individual pixels I draw into. DrawNode can be used only to draw and has some limitations. Let's say I want to create a color book, where you can flood-fill areas with different colors, but you can also use a brush. I made something like this using Image class - first I load an empty (full transparent) png. From there I can extract RGBA bitmap array (unsigned char*). Then I can access individual pixels as well as change them. So I created basic method like getPixel, setPixel, then drawLine, drawCircle and also floodFill. From this array I'm creating a new texture which I set onto a sprite. Then each time I want to update after some user input I just use updateWithTexture. It works, but has some downsides:
1) it's slow - well not single shape, but when you use a "brush" only method I found is to draw circles next to each other. I know - it's overdrawing a lot, but I couldn't figure out any algorithm to draw it right without circles. I did exactly the same in libgdx (other framework) and it's way faster. Just updateWithTexture is costly.
2) no antialiasing - well it's not out of the box. Again thick line is the most problematic stuff.So I'm looking for some engine, which can:
1) draw all primitives like single pixels, lines, thick lines (with rounded corners), circles, etc.
2) be fast
3) have anti-aliasing so everything looks very smooth
4) allows me to also read single pixels so I can implement flood fill for example
5) c++ ofc and working on mac os, iOS and android
Posts: 1
Participants: 1