Tangent128 / luasdl2

A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
ISC License
385 stars 73 forks source link

Quick Question! #4

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello does luasdl 2 work with android? I mean can I compile it to android and make it work?Also does it work on all desktop platforms? Thanks!

Edit 1 : It works with 2d and 3d right?

ghost commented 9 years ago

Also how can I compile the .lua examples?

Tangent128 commented 9 years ago

Lua is a scripting language, not a compiled language, so the .lua examples should work by running "lua path/to/script" so long as you have luasdl2 installed where the interpreter can find it.

As for the main question, I do not know either way as to whether compiling for Android works or not.

SDL2 is supposed to work with Android, and luasdl2 tries to bind only to SDL2's APIs and not anything platform-specific, so in theory it should at least be possible. The build system's where you are probably most likely to stumble.

So, short answer, you can probably "make it work", but it might be a fight.

Desktop-wise, the code should support Linux, Windows, and OS X just fine. (I am not equipped to test the latter two at the moment, but since taking over maintainership I have not made any changes that should break them and nobody has reported them broken.)

Also probably of relevance to you, SDL2's drawing functions are supported, including initializing an OpenGL context, but as SDL does not wrap the OpenGL functions, you'll need a separate OpenGL binding if you want to draw 3D graphics.

ghost commented 9 years ago

I'm a linux user too.Any programs recomanded for building everything?

Tangent128 commented 9 years ago

cmake is the build system used; find an IDE suiting your tastes, or else use the command line.

You'll also need Lua, obviously.