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

Method setVertexLimit

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

limit the number of vertices sent to OpenGL without truncating the declared size of the storage.

(int limit)

Source from the content-addressed store, hash-verified

128 * limit the number of vertices sent to OpenGL without truncating the declared size of the storage.
129 */
130 public int setVertexLimit(int limit) {
131 for (int i = 0; i < buffers.length; i++) {
132 ArrayBuffer o = buffers[i];
133 if (o != null && o.getSize() < limit) {
134 buffers[i] = buffers[i].replaceWithSize(limit);
135 }
136 }
137 limitVertex = limit;
138 trimVertexLimit();
139 maxVertex = Math.max(maxVertex, limitVertex);
140 return limitVertex;
141 }
142
143 /**
144 * truncate or extend the size of this mesh's vertex storage (and aux storage)

Callers 1

doCloseMethod · 0.80

Calls 4

getSizeMethod · 0.95
trimVertexLimitMethod · 0.95
replaceWithSizeMethod · 0.65
maxMethod · 0.45

Tested by

no test coverage detected