MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / setVertexMax

Method setVertexMax

src/main/java/field/graphics/BaseMesh.java:146–157  ·  view source on GitHub ↗

truncate or extend the size of this mesh's vertex storage (and aux storage)

(int vertexMax)

Source from the content-addressed store, hash-verified

144 * truncate or extend the size of this mesh's vertex storage (and aux storage)
145 */
146 private int setVertexMax(int vertexMax) {
147 for (int i = 0; i < buffers.length; i++) {
148 ArrayBuffer o = buffers[i];
149 if (o != null && o.getSize() != vertexMax) {
150 buffers[i] = buffers[i].replaceWithSize(vertexMax);
151 }
152 }
153 limitVertex = maxVertex = vertexMax;
154 trimVertexLimit();
155 maxVertex = limitVertex;
156 return maxVertex;
157 }
158
159 /**
160 * limit the number of elements sent to OpenGL without truncating the declared size of the storage.

Callers 1

standardMethod · 0.95

Calls 3

getSizeMethod · 0.95
trimVertexLimitMethod · 0.95
replaceWithSizeMethod · 0.65

Tested by

no test coverage detected