Proposed change to

Over at @wezrule pointed out an bug in how Mesh.deepClone() initializes the elementCount and vertCount fields.

As far as I know, no issue has been opened at Google Code for this.

I propose to commit Wesley’s patch to /branches/gradle-restructure/jme3-core/src/main/java/com/jme3/scene/ and /trunk/engine/src/core/com/jme3/scene/


--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -240,8 +240,8 @@
             clone.vertexArrayID = -1;
-            clone.vertCount = -1;
-            clone.elementCount = -1;
+            clone.vertCount = vertCount;
+            clone.elementCount = elementCount;
             // although this could change
             // if the bone weight/index buffers are modified

I wonder how you are able to scan trough all that code and still find all those bugs :slight_smile:
You just earned 10 +1 ones

And sorry for OT

Looks good to me.

1 Like

go ahead.
Isn’t Wes able to commit?

1 Like

cheers @sgold. If you are feeling adventurous, you can also have a look at this one as well:

I did no testing nor checked if it even compiled (my build was a bit screwed if I recall). Thank

@nehon said: Isn't Wes able to commit?

I also have quite a few engine modifications I will submit at some point, mainly to do with android optimizations.

Starting with this one someone found (actually it is a bug fix):

People with the same problem:

In, you need to add:


before GLES20.glClear(bits);

in ClearBuffers(). If it is set to false (i.e the last thing rendered did not have depth writing), you get a screwed up depth buffer. (sorry I’m at work, so no diffs).

If you are again feeling adventurous :wink: @sgold keep up the good work!!

1 Like

If you haven’t already, you should record all these issues at Google Code so they are not forgotten:

I’ll put the removePreView() issue on my to-do list. I don’t feel comfortable making edits to the Android module, however. That involves special expertise of a sort I don’t possess—though I hope to some day soon.

The @wezrule fix is in trunk as of rev 11080. To my mind, this is a good candidate for the 3.0.6 release.