MCPcopy Index your code
hub / github.com/processing/p5.js / _getVertexBuffers

Method _getVertexBuffers

src/webgpu/p5.RendererWebGPU.js:1280–1300  ·  view source on GitHub ↗
(shader)

Source from the content-addressed store, hash-verified

1278 }
1279
1280 _getVertexBuffers(shader) {
1281 if (!shader._vertexBuffers) {
1282 const buffers = [];
1283
1284 for (const attrName in shader.attributes) {
1285 const attr = shader.attributes[attrName];
1286 if (!attr || attr.location === -1) continue;
1287
1288 // Get the vertex buffer info associated with this attribute
1289 const renderBuffer =
1290 this.buffers[shader.shaderType].find(buf => buf.attr === attrName) ||
1291 this.buffers.user.find(buf => buf.attr === attrName);
1292 if (!renderBuffer) continue;
1293
1294 buffers.push(renderBuffer);
1295 }
1296 shader._vertexBuffers = buffers;
1297 }
1298
1299 return shader._vertexBuffers;
1300 }
1301
1302 _getFormatFromSize(size) {
1303 switch (size) {

Callers 1

_drawBuffersMethod · 0.95

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected