Browse Source

Changelog for next release.
In the demo scripts, only increase decal max. vertex/index count when targeting skinned geometry.
Do not try to add decals in headless mode.

Lasse Öörni 13 years ago
parent
commit
c9ea9cb384

+ 7 - 3
Bin/Data/Scripts/Terrain.as

@@ -379,8 +379,12 @@ void HandleMouseButtonDown(StringHash eventType, VariantMap& eventData)
                     {
                         decal = result.drawable.node.CreateComponent("DecalSet");
                         decal.material = cache.GetResource("Material", "Materials/UrhoDecal.xml");
-                        decal.maxVertices = 2048;
-                        decal.maxIndices = 4096;
+                        // Increase max. vertices/indices if the target is skinned
+                        if (result.drawable.typeName == "AnimatedModel")
+                        {
+                            decal.maxVertices = 2048;
+                            decal.maxIndices = 4096;
+                        }
                     }
                     decal.AddDecal(result.drawable, rayHitPos, cameraNode.worldRotation, 0.5, 1.0, 1.0, Vector2(0, 0),
                         Vector2(1, 1));
@@ -434,7 +438,7 @@ void HandlePostRenderUpdate()
         renderer.DrawDebugGeometry(false);
     if (drawDebug == 2)
         testScene.physicsWorld.DrawDebugGeometry(true);
-    
+
     IntVector2 pos = ui.cursorPosition;
     if (ui.GetElementAt(pos, true) is null && testScene.octree !is null)
     {

+ 6 - 2
Bin/Data/Scripts/TestScene.as

@@ -426,8 +426,12 @@ void HandleMouseButtonDown(StringHash eventType, VariantMap& eventData)
                     {
                         decal = result.drawable.node.CreateComponent("DecalSet");
                         decal.material = cache.GetResource("Material", "Materials/UrhoDecal.xml");
-                        decal.maxVertices = 2048;
-                        decal.maxIndices = 4096;
+                        // Increase max. vertices/indices if the target is skinned
+                        if (result.drawable.typeName == "AnimatedModel")
+                        {
+                            decal.maxVertices = 2048;
+                            decal.maxIndices = 4096;
+                        }
                     }
                     decal.AddDecal(result.drawable, rayHitPos, cameraNode.worldRotation, 0.5, 1.0, 1.0, Vector2(0, 0),
                         Vector2(1, 1));

+ 6 - 2
Bin/Data/Scripts/TestSceneOld.as

@@ -539,8 +539,12 @@ void HandleMouseButtonDown(StringHash eventType, VariantMap& eventData)
                     {
                         decal = result.drawable.node.CreateComponent("DecalSet");
                         decal.material = cache.GetResource("Material", "Materials/UrhoDecal.xml");
-                        decal.maxVertices = 2048;
-                        decal.maxIndices = 4096;
+                        // Increase max. vertices/indices if the target is skinned
+                        if (result.drawable.typeName == "AnimatedModel")
+                        {
+                            decal.maxVertices = 2048;
+                            decal.maxIndices = 4096;
+                        }
                     }
                     decal.AddDecal(result.drawable, rayHitPos, cameraNode.worldRotation, 0.5, 1.0, 1.0, Vector2(0, 0),
                         Vector2(1, 1));

+ 11 - 0
Docs/Urho3D.dox

@@ -152,4 +152,15 @@ V1.16
 - More physics constraint types.
 - Rendering and networking performance optimizations.
 - Use Squish library to implement software DXT decompression when not supported in hardware.
+
+V1.2
+
+- Android and iOS support.
+- Decal rendering.
+- Terrain rendering.
+- Joystick input support.
+- Use SDL library for windowing and input on all platforms.
+- KTX and PVR image loading (for ETC1 & PVRTC compressed textures.)
+- Removed need for shader preprocessing; reorganized shaders to be more friendly to base custom shaders on.
+- Inbuilt geometry shapes in the editor.
 */

+ 2 - 1
Engine/Graphics/DecalSet.cpp

@@ -281,7 +281,8 @@ bool DecalSet::AddDecal(Drawable* target, const Vector3& worldPosition, const Qu
 {
     PROFILE(AddDecal);
     
-    if (!node_)
+    // Do not add decals in headless mode
+    if (!node_ || !GetSubsystem<Graphics>())
         return false;
     
     if (!target || !target->GetNode())

+ 10 - 0
Readme.txt

@@ -235,3 +235,13 @@ V1.16   - Switched to Bullet physics library.
         - Rendering and networking performance optimizations.
         - Use Squish library to implement software DXT decompression when not
           supported in hardware.
+
+V1.2    - Android and iOS support.
+        - Decal rendering.
+        - Terrain rendering.
+        - Joystick input support.
+        - Use SDL library for windowing and input on all platforms.
+        - KTX and PVR image loading (for ETC1 & PVRTC compressed textures.)
+        - Removed need for shader preprocessing; reorganized shaders to be more
+          friendly to base custom shaders on.
+        - Inbuilt geometry shapes in the editor.