|
|
@ -390,6 +390,12 @@ public class VertexBuffer extends GLObject implements Savable, Cloneable { |
|
|
|
if (id != -1) |
|
|
|
if (id != -1) |
|
|
|
throw new UnsupportedOperationException("Data has already been sent. Cannot setupData again."); |
|
|
|
throw new UnsupportedOperationException("Data has already been sent. Cannot setupData again."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (usage == null || format == null || data == null) |
|
|
|
|
|
|
|
throw new IllegalArgumentException("None of the arguments can be null"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (components < 1 || components > 4) |
|
|
|
|
|
|
|
throw new IllegalArgumentException("components must be between 1 and 4"); |
|
|
|
|
|
|
|
|
|
|
|
this.data = data; |
|
|
|
this.data = data; |
|
|
|
this.components = components; |
|
|
|
this.components = components; |
|
|
|
this.usage = usage; |
|
|
|
this.usage = usage; |
|
|
|