aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-ui
diff options
context:
space:
mode:
authorRenanse <[email protected]>2013-01-23 16:05:17 -0600
committerRenanse <[email protected]>2013-01-23 16:05:17 -0600
commit389f232d86b555c229c7c36ef90bea5dbe4ee108 (patch)
tree36f820201fe1ba60bddb3199775b40f58cb9629c /ardor3d-ui
parent53e5c7e2d0f3533db78f030b6dee0c7970a0c3a0 (diff)
parentad0ca2d851240408aa47851019f037d1072784f4 (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'ardor3d-ui')
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java7
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java
index 45fbebd..5a079b9 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java
@@ -18,11 +18,12 @@ import com.ardor3d.math.type.ReadOnlyColorRGBA;
import com.ardor3d.renderer.IndexMode;
import com.ardor3d.renderer.Renderer;
import com.ardor3d.renderer.state.BlendState;
-import com.ardor3d.renderer.state.ShadingState;
import com.ardor3d.renderer.state.BlendState.DestinationFunction;
import com.ardor3d.renderer.state.BlendState.SourceFunction;
+import com.ardor3d.renderer.state.ShadingState;
import com.ardor3d.renderer.state.ShadingState.ShadingMode;
import com.ardor3d.scenegraph.FloatBufferData;
+import com.ardor3d.scenegraph.IndexBufferData;
import com.ardor3d.scenegraph.Mesh;
import com.ardor3d.util.geom.BufferUtils;
@@ -198,7 +199,9 @@ public class SolidBorder extends UIBorder {
mesh.getMeshData().setVertexCoords(new FloatBufferData(BufferUtils.createVector2Buffer(8), 2));
mesh.getMeshData().setColorBuffer(BufferUtils.createColorBuffer(8));
mesh.getMeshData().setIndexMode(IndexMode.TriangleStrip);
- mesh.getMeshData().setIndexBuffer(BufferUtils.createIntBuffer(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1 }));
+ final IndexBufferData<?> indices = BufferUtils.createIndexBufferData(10, 7);
+ indices.put(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1 });
+ mesh.getMeshData().setIndices(indices);
// set up alpha blending.
final BlendState blend = new BlendState();
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java
index 4e30461..bd987b5 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java
@@ -37,7 +37,7 @@ public class TextCaret {
public TextCaret() {
final MeshData md = _strip.getMeshData();
md.setVertexBuffer(BufferUtils.createVector3Buffer(4));
- md.setIndexBuffer(BufferUtils.createIntBuffer(new int[] { 0, 1, 3, 2 }));
+ md.setIndices(BufferUtils.createIndexBufferData(new int[] { 0, 1, 3, 2 }, 3));
md.setIndexMode(IndexMode.TriangleStrip);
final float[] vals = new float[] { 0, 0, 0, //
1, 0, 0, //