Team Spartan Cookies & Milk Forums
Lua - a drawing library for Android - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: General (https://teamscm.co.uk/forum-1.html)
+--- Forum: General Discussion (https://teamscm.co.uk/forum-3.html)
+--- Thread: Lua - a drawing library for Android (/thread-1414.html)



Lua - a drawing library for Android - Destiny's Player - 20-10-2015

Anybody knows if there is a Lua library which allows you to 2D draw, ala Starfall, and which works on Android, both allowing you to write on it and to launch it on it? If possible it would be nice if it didn't have any features outside of 2D rendering, but any variant would be nice.


RE: Lua - a drawing library for Android - rouing - 20-10-2015

http://www.luaj.org/luaj/3.0/README.html


RE: Lua - a drawing library for Android - Destiny's Player - 20-10-2015

And where's the rendering library? Or do you need to find a java one, and use this thing as a mid-step?

The thing is, I've already found Lua for Android. I'm just trying to find a graphics library that also works with Android and which doesn't have a ton of other features that I don't need, aka all of these game engines.


RE: Lua - a drawing library for Android - Yuri6037 - 21-10-2015

Use Android NDK then create C lua lib for GL bindings. Note also that Android uses OpenGLES while most computers uses OpenGL.

Some functions in standard OpenGL may not be included in the ES version.

Anyways, I'd myself use Android NDK to develop a C application as a window base and implement rendering support using direct bindings to GL. That means sf render functions such as drawRect are not included gl works completely differently, it works with vertex draw. It's similar to drawPoly in SF.
After I don't recomend you using Java to bind rendering to lua for one good reason, Java runs through a virtual machine before it can be interpreted by the physical CPU. Adding lua on top would make 2 virtual machines before running to the physical CPU.
Instead, making C lua bindings for GL will reduce virtual machines by 1. C will interpret lua, and C is already directly interpreted by the physical CPU.

This said, I'm not an expert in Android development. I haven't succeeded to compile anything through Android NDK. It seams to be much more easy to compil for android on a Linux machine.