# Some questions about Defold

**URL:** <https://forum.defold.com/t/some-questions-about-defold/66594>\
**Category:** Questions\
**Created:** [October 13, 2020, 6:09am UTC](https://forum.defold.com/t/some-questions-about-defold/66594 "2020-10-13T06:09:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sorrowful.free](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sorrowful.free/32/22279_2.png) [@sorrowful.free](https://forum.defold.com/u/sorrowful.free)\
**Post date:** [October 13, 2020, 6:09am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/1 "2020-10-13T06:09:11Z")

</div>

Hello! I try understand defold by source code, where live lua engine(in main thread)?  
And next question, you have light class in c-code but no one word in documentation about how call it from lua not exist, please explain it if you could, thank you!

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 13, 2020, 6:46am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/2 "2020-10-13T06:46:09Z")

</div>

Yes, we have one Lua context, and it lives on the main thread.

> you have light class in c-code

Are you referring to Lua’s `lightuserdata`?  
There is not much documentation about it on their documentation page:

> **[Index - Lua 5.1 Reference Manual - contents](https://www.lua.org/manual/5.1/index.html#index)**
>
> basic \_G \_VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall

---

<div class="post-metadata">

**Author:** ![sorrowful.free](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sorrowful.free/32/22279_2.png) [@sorrowful.free](https://forum.defold.com/u/sorrowful.free)\
**Post date:** [October 13, 2020, 7:52am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/3 "2020-10-13T07:52:44Z")

</div>

Thank you for your answer! I ask you about [This](https://github.com/defold/defold/blob/1.2.174/engine/gamesys/src/gamesys/components/comp_light.h)

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 13, 2020, 7:56am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/4 "2020-10-13T07:56:09Z")

</div>

Ah, yes. That is an old class, that is deprecated.  
We keep deprecated classes around, but remove the documentation for them. We keep them for backwards compatibility only. We aim to remove them at some point.

---

<div class="post-metadata">

**Author:** ![sorrowful.free](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/sorrowful.free/32/22279_2.png) [@sorrowful.free](https://forum.defold.com/u/sorrowful.free)\
**Post date:** [October 13, 2020, 7:56am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/5 "2020-10-13T07:56:57Z")

</div>

And another one, render-thread and lua-thread separated? Or all game logic process first and the start rendering?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 13, 2020, 7:58am UTC](https://forum.defold.com/t/some-questions-about-defold/66594/6 "2020-10-13T07:58:51Z")

</div>

We currently render on the main thread. See engine.cpp.
