Allow per-tiles culling.
authorAuke Kok <sofar@foo-projects.org>
Tue, 19 Jan 2016 04:44:46 +0000 (20:44 -0800)
committerparamat <mat.gregory@virginmedia.com>
Wed, 20 Jan 2016 00:36:48 +0000 (00:36 +0000)
commit882a89d65aa78b89cfaf2af054d15cc4c94ad022
tree3cdb76c54ef6b9964bc35b7f1490bf333ca42126
parent9f988e3b962389e10a7cf010fd4bf0f81d70e31a
Allow per-tiles culling.

Backface culling is enabled by default for all tiles, as this
is how the lua parser initializes each tiledef. We revert to
always using the value from the tiledef since it is always
read and serialized.

Mods that wish to enable culling for e.g. mesh nodes, now can
specify the following to enable backface culling:

    tiles = {{ name = "tex.png", backface_culling = true }},

Note the double '{' and use of 'name' key here! In the same
fashion, backface_culling can be disabled for any node now.

I've tested this against the new door models and this properly
allows me to disable culling per node. I've also tested this
against my crops mod which uses mesh nodes where culling needs
to be disabled, and tested also with plantlike drawtype nodes
where we want this to continue to be disabled.

No default setting has changed. The defaults are just migrated
from nodedef.cpp to c_content.cpp.
doc/lua_api.txt
src/nodedef.cpp
src/script/common/c_content.cpp