Lasse Öörni
165b7c8eae
Default to ENABLE_SAFE_LUA=0 for improved performance.
2013-10-01 18:40:47 +00:00
Lasse Öörni
36e165596a
Create a dedicated depth stencil texture in View3D so that temporary depth stencils are not constantly generated when resizing a View3D.
...
Decrease screen buffer idle time before destruction to 1 second.
2013-09-30 11:22:11 +00:00
Aster Jian
a570bb8ad6
Add LuaJIT support in LuaScript module, please use ENABLE_LUA_JIT to enable it, just test on Windows.
2013-09-29 14:38:03 +00:00
Aster Jian
2d3740d28c
Fixed an error in PushString.
2013-09-29 09:00:59 +00:00
Lasse Öörni
fc2854167c
Changed Lua library & object registration order to ensure base classes are correctly set up.
2013-09-28 19:34:45 +00:00
Lasse Öörni
c7f098de3e
Updated documentation on changed Lua function call mechanism.
2013-09-27 21:36:19 +00:00
Lasse Öörni
c3870201b9
Added TransformChanged() script method to ScriptInstance & LuaScriptInstance. Called when node transform changes (hooks to OnMarkedDirty() on C++ side)
...
Ensure that LuaScriptInstance listens only to its own scene's & physics world's update events.
Changed LuaScriptInstance to use IsEnabledEffective() to make sure it gets disabled if the node is disabled.
2013-09-27 20:56:35 +00:00
Wei Tjong Yao
09ba853aba
Keep CMakeCache.txt in between build script invocation to speed things up. Correct typo error.
2013-09-26 20:56:42 +00:00
Aster Jian
4b9f241065
Add LuaFunction class, Add more Lua API in Sound, fixed typo.
2013-09-26 16:18:38 +00:00
Lasse Öörni
e5b7b6c916
Re-enable Lua's default loaders. Register own loader last into the table.
2013-09-26 07:23:09 +00:00
Lasse Öörni
49319ddb57
Disable Lua's inbuilt loaders. This fixes LuaScript's own loader possibly failing on Linux.
2013-09-25 19:44:35 +00:00
Lasse Öörni
4d4cb2cbb3
Fix incorrect assignment.
2013-09-25 17:11:05 +00:00
Lasse Öörni
d22dab085d
Restored Variant constructors & equality operators.
2013-09-25 14:30:24 +00:00
Lasse Öörni
862ca75a46
Added script (pkgToDox.lua) which regenerates Lua script API documentation. It can be run with a standalone Lua interpreter.
2013-09-25 06:59:47 +00:00
Wei Tjong Yao
1250776d0c
Added basic.lua as dependency in build script so that C++ to Lua binding codes would be automatically rebuilt.
2013-09-25 04:16:49 +00:00
Aster Jian
e4fda39b47
Rename function to solve name conflict with base class.
2013-09-24 15:51:21 +00:00
Aster Jian
241afce241
Handle enabled/disabled state change.
2013-09-24 13:21:27 +00:00
Lasse Öörni
586d878509
Fix enum.
2013-09-23 18:51:50 +00:00
Lasse Öörni
dbd7687c56
Added configurable Z bias to Text3D effect.
...
Default Text effect color changed to opaque black.
2013-09-23 18:49:50 +00:00
Aster Jian
902300e2e5
Add TextEffect in Text3D class.
2013-09-23 15:00:31 +00:00
Aster Jian
318d2bd5ef
Add TextEffect in Text class.
2013-09-23 14:38:21 +00:00
Aster Jian
bbf193dd5f
Move tolua++ Urho3D extension in a file, Move PushParameters function in ToluaUrho3DEx and change return type to bool.
2013-09-23 05:29:03 +00:00
Lasse Öörni
eb6ba62ab9
Added the LuaScript library to Doxygen documentation.
...
Added LuaScript doxygen page.
2013-09-22 23:41:27 +00:00
Lasse Öörni
f93a5e4a23
LuaScript library header formatting. Allow parameters also for procedural Lua functions. Renamed LuaScriptInstance::Execute() to ExecuteFunction().
2013-09-22 22:08:26 +00:00
Lasse Öörni
48532b2509
Added C++ / script integration samples, which reimplement AnimatingScene sample, but use a script object instead of a C++ component.
...
Added Execute() function to LuaScriptInstance.
Fixed LuaScriptInstance::SetScriptFileName() not loading the script.
2013-09-22 19:15:30 +00:00
Aster Jian
75a55050b7
Fixed Lua Chat sample bug, Replace Variant's constructor with SetXXX function.
2013-09-22 15:12:37 +00:00
Aster Jian
472a2b9bd9
Added Lua Chat sample.
2013-09-22 14:18:44 +00:00
Aster Jian
00342501ab
Binding more class in IO lib to Lua, Fixed multi inheritance class.
2013-09-22 05:51:05 +00:00
Lasse Öörni
da45ff6b6b
Added SceneReplication Lua sample.
2013-09-21 22:08:05 +00:00
Lasse Öörni
81f5233ef7
Added Lua Ragdolls sample.
2013-09-20 21:50:20 +00:00
Aster Jian
cb19db83d1
Add RenderToTexture and Physics sample in Lua.
2013-09-20 14:59:54 +00:00
Lasse Öörni
7a55a43725
Tidied up the sample descriptions.
...
Exposed UIElement::SetVar() and GetVar() to Lua script.
Modified the Lua Sprites sample to use custom vars inside UIElement.
2013-09-20 07:30:07 +00:00
Lasse Öörni
1cd73e46fd
Exposed StaticModelGroup to script. Ported HugeObjectCount example group mode switching to script versions.
2013-09-19 22:44:06 +00:00
Aster Jian
6e58119be9
Fixed typo error in comment.
2013-09-19 13:49:19 +00:00
Lasse Öörni
b3777b652c
Fixed StaticModel::SetModel() getting called instead of AnimatedModel::SetModel() in Lua script.
2013-09-18 23:42:48 +00:00
Wei Tjong Yao
e376dc4562
Identity the maintainer of the Urho3D/Lua fork. Regenerate toluabind.c and toluabind.h using bootstrap process. Only call 'standard' script functions when they are available and be silent about it when they are not defined in the Lua script.
2013-09-18 21:49:04 +00:00
Aster Jian
0ddb13f148
Add Update, PostUpdate, Save, Load function in LuaScriptInstance, Add one more LoadXML and SaveXML in Scene, Add destructor function in Math lib.
2013-09-18 17:25:16 +00:00
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
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
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
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
Aster Jian
5b1879c0ff
Add unsubscribe from event functions in LuaScript and LuaScriptInstance.
2013-09-16 15:58:29 +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
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
8710d28a79
Convert Vector<String> to Lua table, remove const char* type.
2013-09-13 14:41:58 +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
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
e9535c8336
Fix Lua SendEvent with parameters.
2013-09-12 17:59:32 +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
Aster Jian
c8df2956a2
Remove ExecuteFile function in Lua.
2013-09-12 05:23:03 +00:00
Lasse Öörni
a9f13ebdfe
Added LuaScriptInstance subscribe to specific sender's event.
2013-09-11 23:51:03 +00:00
Aster Jian
c2eec49b7a
Add faster Lua API function in Node class.
2013-09-10 14:35:20 +00:00
Aster Jian
caf5aa4118
Store Lua function to LUA_REGISTRYINDEX table, make better performance.
2013-09-10 05:13:50 +00:00
Aster Jian
dfc7647277
Replace table with spaces.
2013-09-09 06:50:17 +00:00
Aster Jian
f9e2d7c9d1
Add LuaScriptInstance class.
2013-09-09 06:32:58 +00:00
Lasse Öörni
4741b3cf08
Added Blender exporter from Reattiva.
2013-09-08 10:51:02 +00:00
Lasse Öörni
c1e03c48db
Combine octree update & reinsertion queuing.
...
Queue only one large work item per thread for threaded Octree & View operations.
Protect the network replication dirty sets with mutex if nodes/components are inserted during the threaded update phase.
2013-09-07 21:08:40 +00:00
Lasse Öörni
372fbed88d
Normalize resource names in SanitateResourceName() if they also contain a registered resource dir name, ie. Data/Scripts/NinjaSnowWar.as becomes Scripts/NinjaSnowWar.as. This fixes script file possibly getting loaded twice.
...
Fixed renderer raycasts returning wrong distance.
Added caseSensitive parameter to several String functions.
Added option to convert file extension to lowercase in GetExtension() and GetFileNameAndExtension() functions.
Removed unnecessary lowercase conversion of extensions, and complicated string compare logic.
2013-09-05 14:57:45 +00:00
Aster Jian
411f6af885
Add const char* parameter to File's constructor.
2013-09-05 10:24:09 +00:00
Aster Jian
1428423af1
Add GetEventSender function, Add Node::GetChild function.
2013-09-05 05:43:00 +00:00
Lasse Öörni
caf0994b8f
Optimize vector/quaternion Normalize() to a no-op if already at unit length. Changed return value to void.
...
Optimize cache friendliness of Drawable bounding box update by including the local-space bounding box in the base class. Not used in all subclasses.
Optimize Drawable zone handling by making the zone pointers raw pointers instead of weak. Now finding a drawable's zone can be performed in the threaded view preparation phase.
Removed unnecessary collection of whole visible scene bounding box; it is not used anywhere.
2013-09-04 22:08:47 +00:00
Aster Jian
e803d1c844
Remove unsupported operator != in Color.pkg.
2013-09-04 12:42:09 +00:00
Aster Jian
90c29aecfb
Add type to some template method, lick Node::CreateComponent etc. Add LoadChunk and LoadAndExecute in LuaFile, Add DrawDebugGeometry in Renderer.
2013-09-04 11:52:10 +00:00
Lasse Öörni
be7636f823
Make the include path absolute in all script examples so that ScriptCompiler can compile them properly.
...
Renamed Octree::Resize() to Octree::SetSize()
When destroying a scene, destroy root-level components first so that child node components are detached from their internal structures and can be destroyed faster in turn.
Use raw pointers instead of weak pointers in Octree update/reinsertion lists for some performance gain.
2013-09-03 20:45:53 +00:00
Lasse Öörni
6229e36a1e
Show filename for Lua subsystem error messages where possible.
2013-09-02 18:02:34 +00:00
Lasse Öörni
ccdd318eff
Use matching else-if construct in AngelScript & Lua Sample code.
...
Changed ErrorDialogs in the Lua subsystem to error logging (subsystems should not pop up dialogs on their own.)
2013-09-02 14:23:47 +00:00
Lasse Öörni
7f64104825
Added -p command line argument, which specifies resource paths to use.
...
Added IsAbsolutePath() function to FileSystem.
Removed unnecessary double error message from ResourceCache.
2013-08-30 11:03:07 +00:00
Aster Jian
367a930a93
Add Lua File class. Make Lua file as resource.
2013-08-29 05:56:35 +00:00
Lasse Öörni
04b00263b0
Moved CharacterDemo to the samples.
...
Use forward declarations in the samples.
2013-08-27 21:45:43 +00:00
Lasse Öörni
3b32acf27f
Added possibility to clear scene of only replicated or local content. Do not clear local content from a client scene when joining a server. This makes the startup of the SceneReplication sample faster, as the static scene is not replicated.
...
Exposed missing Node::RemoveAllComponents() to script.
2013-08-27 15:15:30 +00:00
Lasse Öörni
fc1c2e6f13
Initial Navigation sample.
...
Added overload of NavigationMesh::DrawDebugGeometry() that finds the DebugRenderer component from the root scene node automatically.
2013-08-25 18:47:48 +00:00
Lasse Öörni
9ff0247c68
Applied material editor preview patch from primitivewaste, which also adds View3D UI element class.
2013-08-25 12:11:52 +00:00
Lasse Öörni
42093ea88c
Allow programmatic control of the mip reduction settings of Texture.
...
Fixed fonts loading incorrectly when texture quality is not at maximum.
2013-08-22 20:36:52 +00:00
Lasse Öörni
c14bf5bd69
Added Bullet rolling friction parameter to RigidBody.
...
RigidBody code cleanup.
2013-08-21 18:44:58 +00:00
Lasse Öörni
26a9bc763e
Added Temporary flag to Serializable, which means it will not be saved if enabled. Currently the sub-nodes created by Terrain are marked temporary.
...
Temporary objects are by default not shown in the editor.
Added trigonometric functions which take degrees argument into the C++ API, not just script.
Edited the Billboards sample.
Made the Urho3D logo in the samples slightly transparent.
2013-08-18 16:50:28 +00:00
Lasse Öörni
1ef35d353c
Added skeletal animation sample.
...
Fixed build of samples.
Removed line to disable MinSizeRel build type in CMake script as it seems to have no effect any longer.
Removed unused function to get AnimationState by C string of animation name.
2013-08-17 18:38:07 +00:00
Wei Tjong Yao
02512cecf9
In order to move the out-of-source 'build' directory back to Urho3D project root directory, all the source codes sub-directories are now moved down one level to a new directory under project root called 'Source'.
2013-08-09 10:29:22 +00:00