(int attribute, int dimension)
| 220 | } |
| 221 | |
| 222 | public ArrayBuffer buffer(int attribute, int dimension) { |
| 223 | if (buffers[attribute] == null && dimension > 0) { |
| 224 | buffers[attribute] = arrayBufferFactory.newArrayBuffer(maxVertex, GL_ARRAY_BUFFER, attribute, dimension, 0); |
| 225 | return buffers[attribute]; |
| 226 | } |
| 227 | |
| 228 | if (dimension == 0) |
| 229 | return buffers[attribute]; |
| 230 | |
| 231 | if (buffers[attribute].getDimension() != dimension) |
| 232 | throw new IllegalArgumentException(" dimension mismatch. Attribute " + attribute + " was previously declared to be of dimension " + buffers[attribute].getDimension() + " not" + |
| 233 | " " + |
| 234 | "" + dimension); |
| 235 | |
| 236 | return buffers[attribute]; |
| 237 | } |
| 238 | |
| 239 | public Map<Integer, ArrayBuffer> buffers() { |
| 240 | Map<Integer, ArrayBuffer> m = new LinkedHashMap<>(); |
no test coverage detected