Draw Pixels (Native Extension)


#1


Draw Pixels.apk.zip (2.3 MB) - apk for performance testing

Defold engine native extension for drawing pixels and simple geometry into texture buffer.
Thanks @britzl and @Mathias_Westerdahl for help.

(Like a result of this polling)

Feel free to contribute!

If you want to contribute and don’t know what you can do, look into next list:

  • Draw rectangle by two corner dots
  • Draw line (maybe with thickness parameter?)
  • Bézier curves
  • Anti aliasing

Materials
http://members.chello.at/~easyfilter/bresenham.html
http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html


#2

Great! Is this to be used for debugging, or fast enough to be used in games?


#3

It depend of your game, but I have plans to use it in one of my game, yes.
I added into main post apk for performance testing.


#4

NE was updated with new parameter “angle” for filled rectangle