Embedding Lua in C++ #5 - Passing Function Parameters From C to Lua

preview_player
Показать описание
These videos describe how to embed Lua into a native application and interface with the Lua C API. They do not cover how to use the scripting language itself.

The stub project for these videos is available here.

The tutorial is on Windows and using CMake and Visual Studio, but you could build this code on pretty much any platform.
Рекомендации по теме
Комментарии
Автор

Thank you for this, reading Lua's source code is absurd.

jdp_man
Автор

Good tutorial but the Pythagore theorem is sqrt((x *x) +(y*y)) if you wanted to get the radian value anyway good tutorial

deadoptick
Автор

This seems ridiculous....I can't think of a reasonable reason to push a function to the stack push the arguments, execute it and retrieve the data. It just seems absurd to go through all that when you can just get a value, put it into a c++ function and then push it back

markyrocks