Skip to content

Commit

Permalink
pack for asynch
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed Jun 27, 2018
1 parent b2a8d75 commit a0d733d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/Scene/PrimitivePipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ define([

var attributes = geometry.attributes;

count += 6 + 2 * BoundingSphere.packedLength + (defined(geometry.indices) ? geometry.indices.length : 0);
count += 7 + 2 * BoundingSphere.packedLength + (defined(geometry.indices) ? geometry.indices.length : 0);

for (var property in attributes) {
if (attributes.hasOwnProperty(property) && defined(attributes[property])) {
Expand Down Expand Up @@ -402,6 +402,7 @@ define([

packedData[count++] = geometry.primitiveType;
packedData[count++] = geometry.geometryType;
packedData[count++] = geometry.offsetAttribute;

var validBoundingSphere = defined(geometry.boundingSphere) ? 1.0 : 0.0;
packedData[count++] = validBoundingSphere;
Expand Down Expand Up @@ -482,6 +483,7 @@ define([

var primitiveType = packedGeometry[packedGeometryIndex++];
var geometryType = packedGeometry[packedGeometryIndex++];
var offsetAttribute = packedGeometry[packedGeometryIndex++];

var boundingSphere;
var boundingSphereCV;
Expand Down Expand Up @@ -542,7 +544,8 @@ define([
boundingSphere : boundingSphere,
boundingSphereCV : boundingSphereCV,
indices : indices,
attributes : attributes
attributes : attributes,
offsetAttribute: offsetAttribute
});
}

Expand Down

0 comments on commit a0d733d

Please sign in to comment.