diff options
Diffstat (limited to 'ardor3d-ui')
-rw-r--r-- | ardor3d-ui/src/main/java/com/ardor3d/extension/ui/border/SolidBorder.java | 7 | ||||
-rw-r--r-- | ardor3d-ui/src/main/java/com/ardor3d/extension/ui/text/TextCaret.java | 2 |
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, // |