MCPcopy Index your code
hub / github.com/benfry/processing4 / attribImpl

Method attribImpl

core/src/processing/opengl/PShapeOpenGL.java:1178–1202  ·  view source on GitHub ↗
(String name, int kind, int type, int size)

Source from the content-addressed store, hash-verified

1176
1177
1178 protected VertexAttribute attribImpl(String name, int kind, int type, int size) {
1179 if (4 < size) {
1180 PGraphics.showWarning("Vertex attributes cannot have more than 4 values");
1181 return null;
1182 }
1183 VertexAttribute attrib = polyAttribs.get(name);
1184 if (attrib == null) {
1185 attrib = new VertexAttribute(pg, name, kind, type, size, PGL.bufferUsageRetained);
1186 polyAttribs.put(name, attrib);
1187 inGeo.initAttrib(attrib);
1188 }
1189 if (attrib.kind != kind) {
1190 PGraphics.showWarning("The attribute kind cannot be changed after creation");
1191 return null;
1192 }
1193 if (attrib.type != type) {
1194 PGraphics.showWarning("The attribute type cannot be changed after creation");
1195 return null;
1196 }
1197 if (attrib.size != size) {
1198 PGraphics.showWarning("New value for vertex attribute has wrong number of values");
1199 return null;
1200 }
1201 return attrib;
1202 }
1203
1204
1205 @Override

Callers 8

attribPositionMethod · 0.95
attribNormalMethod · 0.95
attribColorMethod · 0.95
attribMethod · 0.95
setAttribPositionMethod · 0.95
setAttribNormalMethod · 0.95
setAttribColorMethod · 0.95
setAttribMethod · 0.95

Calls 4

showWarningMethod · 0.95
getMethod · 0.65
putMethod · 0.45
initAttribMethod · 0.45

Tested by

no test coverage detected