//--------------------------------------------------------------
void ofVboByteColor::updateMesh(const ofMesh & mesh){
	ofMesh * nonconstMesh = (ofMesh*)&mesh;
	if(nonconstMesh->haveVertsChanged()) updateVertexData(mesh.getVerticesPointer(),mesh.getNumVertices());
	if(nonconstMesh->haveColorsChanged()) updateColorData(mesh.getColorsPointer(),mesh.getNumColors());
	if(nonconstMesh->haveNormalsChanged()) updateNormalData(mesh.getNormalsPointer(),mesh.getNumNormals());
	if(nonconstMesh->haveTexCoordsChanged()) updateTexCoordData(mesh.getTexCoordsPointer(),mesh.getNumTexCoords());
}
//--------------------------------------------------------------
void ofVboByteColor::updateColorData(const ofFloatColor * colors, int total) {
	updateColorData(&colors[0].r,total);
}
Beispiel #3
0
//--------------------------------------------------------------
void ofVbo::updateColorData(const ofColor * colors, int total) {
	updateColorData(&colors[0].r,total);
}
USING_AWAY_NAMESPACE

ParticleSegmentedColorState::ParticleSegmentedColorState(IAnimator* animator, ParticleSegmentedColorNode* particleSegmentedColorNode) : ParticleStateBase(animator, particleSegmentedColorNode)
{
	updateColorData();
}