Commit Graph

9612 Commits

Author SHA1 Message Date
Lasse Öörni
0201c1d961 Undefine TOLUA_RELEASE by default for better Lua crash protection. Re-enable with the CMake build option -DENABLE_SAFE_LUA=0.
Fixed some Variant constructors failing in Lua (removed void pointer constructor.)
Removed deprecated RenderMode enum.
Added Camera's ViewOverrideFlags to Lua.
Added MultipleViewports Lua sample.
2013-09-17 19:49:18 +00:00
Lasse Öörni
f8de2a71f0 Align NinjaSnowWar touch buttons to screen corners properly so that they will realign if orientation changes. Fixed touch move not taking the move button position properly into account. 2013-09-17 12:21:08 +00:00
Aster Jian
80acf3e718 Add CreateScriptObject GetScriptObject Lua API in Node class. 2013-09-17 10:42:14 +00:00
Wei Tjong Yao
5d04c531a1 Pass window resized event (due to device orientation change) from SDL to Urho3D::Graphics class for both Android and iOS as well. Note that the event is only sent when the application has not locked the orientation. Minor code cleaned up on LuaScript subsystem. 2013-09-17 09:55:26 +00:00
Lasse Öörni
216ec576f3 Removed VectorToArray optimization which caused debug mode crash. 2013-09-17 08:32:14 +00:00
Lasse Öörni
720ff4c3b8 Fix GCC build. 2013-09-17 07:24:47 +00:00
Lasse Öörni
c20257cdf7 Merged the shaderData_ and worldTransform_ members of Batch & SourceBatch. The idea is that a batch can define multiple world transforms. For static geometry this means instance transforms. For skinned geometry they are bone transforms instead.
Inlined some functions in View & Drawable.
2013-09-17 07:14:13 +00:00
Aster Jian
78a77a7e36 Add type parameter to VariantMap::GetPtr funcition, so we can get correct type in Lua.
Remove SetCamera and GetCamera etc function in VariantMap, pls use SetPtr and GetPtr.
2013-09-17 05:55:04 +00:00
Lasse Öörni
b55dead807 Added Decals Lua sample. 2013-09-16 20:44:11 +00:00
Lasse Öörni
39fc6dfd64 Fix the scene loading/saving to work from Lua. Before, casts to Deserializer/Serializer would crash due to File's multiple-inheritance. Note that the file still needs to be closed manually. 2013-09-16 20:03:52 +00:00
Lasse Öörni
274a345db5 Added Billboards Lua sample. 2013-09-16 19:20:26 +00:00
Wei Tjong Yao
0c02a88add Supplement documentation regarding UI default style file. 2013-09-16 16:40:19 +00:00
Aster Jian
5b1879c0ff Add unsubscribe from event functions in LuaScript and LuaScriptInstance. 2013-09-16 15:58:29 +00:00
Lasse Öörni
22d579eea7 Documented the need to either specify a UI style file when loading a layout, or having it set to the root element beforehand. 2013-09-16 14:46:26 +00:00
Lasse Öörni
5f09777de0 Edit comment. 2013-09-15 23:44:33 +00:00
Lasse Öörni
dcb39bf810 Add note of Direct3D9 bool shader constants possibly having no effect.
Add support for Color shader parameters inside a Variant (same as Vector4.)
Parse bool shader parameters in Material & RenderPath.
2013-09-15 23:42:59 +00:00
Wei Tjong Yao
7594f8105a Applied Raspberry Pi patch sent by Colin Barrett. 2013-09-15 23:35:13 +00:00
Wei Tjong Yao
46205d8efd Fixed compilation error on D3D9Graphics class. 2013-09-15 23:18:01 +00:00
Wei Tjong Yao
51d2a7321a Added support to pass boolean shader parameter value. 2013-09-15 21:57:14 +00:00
Wei Tjong Yao
27a68828ce Corrected typo in documentation for renderpath's quad command. 2013-09-15 21:10:31 +00:00
Lasse Öörni
4696717b7f Code and comment cleanup. 2013-09-15 20:57:07 +00:00
Lasse Öörni
36892ae86c Clear pending ID attributes when the script object is destroyed. 2013-09-15 20:49:02 +00:00
Lasse Öörni
81622fec98 Fixed ScriptInstance node / component handle attributes so that they go through the SceneResolver properly.
Use AM_FILE mode in ScriptInstance script attributes to make it more explicit that they aren't network-serialized automatically.
Update wiki.
2013-09-15 20:46:13 +00:00
Lasse Öörni
dda39f2b7d Initial work for serializing Node / Component handles from a script object automatically. 2013-09-15 19:08:05 +00:00
Lasse Öörni
1034f8856f Added scene load/save to C++ VehicleDemo. 2013-09-15 16:38:29 +00:00
Lasse Öörni
ef43398d7f Added scene load/save to CharacterDemo, both C++ & script versions. 2013-09-15 10:51:27 +00:00
Lasse Öörni
311b66f859 Invert also quad projection when camera is inverted.
Fixed GLSL GetQuadTexCoordNoFlip() function.
2013-09-14 22:49:06 +00:00
Lasse Öörni
0f5456d35e Avoid unnecessary rendertarget blitting in OpenGL light prepass mode.
Fixed too dark ambient lighting and environment cube mapping in OpenGL deferred mode.
Added new shader function GetQuadTexCoordNoFlip() which can be used to sample regular texture resources in postprocessing quad passes and documented it.
Removed Camera::SetFlipVertical() from the Lua script API as it should only be called internally to handle OpenGL / Direct3D9 differences.
2013-09-14 22:20:39 +00:00
Lasse Öörni
393d66881c Do not initialize the quick menu twice. 2013-09-14 17:23:13 +00:00
Wei Tjong Yao
a5998c8c89 Cleaned up recent CMake module changes to use variable instead of string in regex matches. 2013-09-14 15:54:58 +00:00
Lasse Öörni
f3e44a22b1 Fix creating UI elements from the quick menu. 2013-09-14 13:19:47 +00:00
Lasse Öörni
f0a965c912 Added quick menu feature to editor contributed by Chris Friesen. Open with Ctrl+Space. 2013-09-14 10:54:06 +00:00
Wei Tjong Yao
81af6af406 Fixed the Lua compilation error in GCC build by making sure the right Precompiled.h include file is found by adjusting the GCC include search path. 2013-09-14 09:56:11 +00:00
Aster Jian
9098cd92c4 Update LuaScriptAPI document. 2013-09-13 16:33:04 +00:00
Aster Jian
ed04210c55 Update Lua code. 2013-09-13 14:43:15 +00:00
Aster Jian
8710d28a79 Convert Vector<String> to Lua table, remove const char* type. 2013-09-13 14:41:58 +00:00
Lasse Öörni
8489eca710 Do not needlessly check for Graphics subsystem in headless mode. 2013-09-13 13:11:55 +00:00
Aster Jian
16360d506f Add default String parameter to tolua_tourho3dstring and tolua_tofieldurho3dstring. 2013-09-13 10:27:02 +00:00
Aster Jian
de816ebeaa Remove Urho3D::String binding in Lua. 2013-09-13 05:44:28 +00:00
Aster Jian
26fb71536a Add Urho3D::String support in tolua++. 2013-09-13 05:41:55 +00:00
Wei Tjong Yao
bb2205e690 Avoid hardcoding Lua API pkg names and at the same time improve build performance by having more granular dependency list. 2013-09-13 04:11:26 +00:00
Lasse Öörni
f07f883ee9 Set proper sound channel type for NinjaSnowWar music. 2013-09-12 18:06:30 +00:00
Lasse Öörni
e9535c8336 Fix Lua SendEvent with parameters. 2013-09-12 17:59:32 +00:00
Lasse Öörni
fc0264e4b9 Set clamp address mode for all cube textures by default. In OpenGL mode seams may appear otherwise. 2013-09-12 17:21:06 +00:00
Aster Jian
0f52702801 Fixed Node::LookAtXYZ function default value. 2013-09-12 13:42:47 +00:00
Lasse Öörni
6f78838b5c Cleaned up Lua event subscription code (do not register C++ handler before Lua function is found successfully.)
Moved Lua script object destruction to a function.
Destroy the old Lua script object before creating new.
Unref the object specific event handler functions when destroying Lua script object.
2013-09-12 07:34:16 +00:00
Aster Jian
d830da9801 Add new CreateObject function in LuaScriptInstance, so can create script object from specific Lua file. 2013-09-12 06:05:03 +00:00
Wei Tjong Yao
205fffb4ad Refactored Sample.h to use class forward for Sprite class. Fixed the alignment of the forward classes to be inlined with convention used by other codes in Urho3D. Added the generated LuaScript wiki into SVN. 2013-09-12 05:44:23 +00:00
Aster Jian
c8df2956a2 Remove ExecuteFile function in Lua. 2013-09-12 05:23:03 +00:00
Aster Jian
d41b4853c0 Fixed some errors in LuaScriptAPI.dox, Add LuaScriptAPI.dox to Urho3D.dox. 2013-09-12 05:21:57 +00:00