Skip to content

Commit d1c8521

Browse files
authored
Update VertexBuffer.java
1 parent 8751505 commit d1c8521

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2023 jMonkeyEngine
2+
* Copyright (c) 2009-2025 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -57,7 +57,7 @@ public class VertexBuffer extends NativeObject implements Savable, Cloneable {
5757
/**
5858
* Type of buffer. Specifies the actual attribute it defines.
5959
*/
60-
public static enum Type {
60+
public enum Type {
6161
/**
6262
* Position of the vertex (3 floats)
6363
*/
@@ -233,7 +233,7 @@ public static enum Type {
233233
* is used. This can determine if a vertex buffer is placed in VRAM
234234
* or held in video memory, but no guarantees are made- it's only a hint.
235235
*/
236-
public static enum Usage {
236+
public enum Usage {
237237
/**
238238
* Mesh data is sent once and very rarely updated.
239239
*/
@@ -261,7 +261,7 @@ public static enum Usage {
261261
* For the {@link Format#Half} type, {@link ByteBuffer}s should
262262
* be used.
263263
*/
264-
public static enum Format {
264+
public enum Format {
265265
/**
266266
* Half precision floating point. 2 bytes, signed.
267267
*/
@@ -1130,6 +1130,7 @@ public void write(JmeExporter ex) throws IOException {
11301130
oc.write(offset, "offset", 0);
11311131
oc.write(stride, "stride", 0);
11321132
oc.write(instanceSpan, "instanceSpan", 0);
1133+
oc.write(name, "name", null);
11331134

11341135
String dataName = "data" + format.name();
11351136
Buffer roData = getDataReadOnly();
@@ -1166,6 +1167,8 @@ public void read(JmeImporter im) throws IOException {
11661167
offset = ic.readInt("offset", 0);
11671168
stride = ic.readInt("stride", 0);
11681169
instanceSpan = ic.readInt("instanceSpan", 0);
1170+
name = ic.readString("name", null);
1171+
11691172
componentsLength = components * format.getComponentSize();
11701173

11711174
String dataName = "data" + format.name();

0 commit comments

Comments
 (0)