Part: Use vector.data() to get data pointer
This commit is contained in:
@@ -733,7 +733,7 @@ bool SoBrepFaceSet::overrideMaterialBinding(SoGLRenderAction *action, SelContext
|
||||
SoMaterialBindingElement::set(state,SoMaterialBindingElement::OVERALL);
|
||||
SoOverrideElement::setMaterialBindingOverride(state, this, true);
|
||||
packedColors.push_back(diffuseColor);
|
||||
SoLazyElement::setPacked(state, this,1, &packedColors[0], hasTransparency);
|
||||
SoLazyElement::setPacked(state, this,1, packedColors.data(), hasTransparency);
|
||||
SoTextureEnabledElement::set(state,this,false);
|
||||
|
||||
if(hasTransparency && action->isRenderingDelayedPaths()) {
|
||||
@@ -834,14 +834,14 @@ bool SoBrepFaceSet::overrideMaterialBinding(SoGLRenderAction *action, SelContext
|
||||
}
|
||||
|
||||
size_t num = materialIndex.getNum();
|
||||
if (num != matIndex.size() || materialIndex.getValues(0) != &matIndex[0]) {
|
||||
if (num != matIndex.size() || materialIndex.getValues(0) != matIndex.data()) {
|
||||
SbBool notify = enableNotify(FALSE);
|
||||
materialIndex.setValuesPointer(matIndex.size(), &matIndex[0]);
|
||||
materialIndex.setValuesPointer(matIndex.size(), matIndex.data());
|
||||
if (notify) enableNotify(notify);
|
||||
}
|
||||
|
||||
SoMaterialBindingElement::set(state, this, SoMaterialBindingElement::PER_PART_INDEXED);
|
||||
SoLazyElement::setPacked(state, this, packedColors.size(), &packedColors[0], hasTransparency);
|
||||
SoLazyElement::setPacked(state, this, packedColors.size(), packedColors.data(), hasTransparency);
|
||||
SoTextureEnabledElement::set(state,this,false);
|
||||
|
||||
if(hasTransparency && action->isRenderingDelayedPaths()) {
|
||||
|
||||
Reference in New Issue
Block a user