MCPcopy Create free account
hub / github.com/microsoft/SandDance / getVertexCount

Function getVertexCount

docs/app/js/sanddance-app.js:65287–65304  ·  view source on GitHub ↗
(_ref2)

Source from the content-addressed store, hash-verified

65285 }
65286}
65287function getVertexCount(_ref2) {
65288 var drawMode = _ref2.drawMode, vertexCount = _ref2.vertexCount;
65289 var primitiveCount = getPrimitiveCount({
65290 drawMode: drawMode,
65291 vertexCount: vertexCount
65292 });
65293 switch(getPrimitiveDrawMode(drawMode)){
65294 case GL_POINTS:
65295 return primitiveCount;
65296 case GL_LINES:
65297 return primitiveCount * 2;
65298 case GL_TRIANGLES:
65299 return primitiveCount * 3;
65300 default:
65301 (0, _utils.assert)(false);
65302 return 0;
65303 }
65304}
65305function decomposeCompositeGLType(compositeGLType) {
65306 var typeAndSize = COMPOSITE_GL_TYPES[compositeGLType];
65307 if (!typeAndSize) return null;

Callers

nothing calls this directly

Calls 2

getPrimitiveCountFunction · 0.70
getPrimitiveDrawModeFunction · 0.70

Tested by

no test coverage detected