//--------------------------------------------------------------
void ofVboByteColor::clear(){
	clearVertices();
	clearNormals();
	clearColors();
	clearTexCoords();
	clearIndices();
}
Exemplo n.º 2
0
void ofVbo::clearAttribute(int attributePos_){

	if (!hasAttribute(attributePos_)) return;
	
	if (ofIsGLProgrammableRenderer()) {
		if(attributePos_>3){
			customAttributes.erase(attributePos_);
		}else{
			switch (attributePos_){
				case ofShader::POSITION_ATTRIBUTE:
					clearVertices();
					break;
				case ofShader::COLOR_ATTRIBUTE:
					clearColors();
					break;
				case ofShader::NORMAL_ATTRIBUTE:
					clearNormals();
					break;
				case ofShader::TEXCOORD_ATTRIBUTE:
					clearTexCoords();
					break;
				default:
					break;
			}
		}
	}else{
		customAttributes.erase(attributePos_);
	}
}
Exemplo n.º 3
0
//--------------------------------------------------------------
void ofVbo::clear(){

	// clear all fixed function attributes
	
	clearVertices();
	clearColors();
	clearNormals();
	clearTexCoords();
	
	// we're not using any of these.
	bUsingVerts = false;
	bUsingColors = false;
	bUsingNormals = false;
	bUsingTexCoords = false;

	// clear all custom attributes.
	customAttributes.clear();
	
	clearIndices();
	if(vaoID!=0){
		releaseVAO(vaoID);
		vaoID=0;
	}
	#if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS)
		unregisterVbo(this);
	#endif
}
Exemplo n.º 4
0
//--------------------------------------------------------------
void ofVbo::clear(){
	clearVertices();
	clearNormals();
	clearColors();
	clearTexCoords();
	clearIndices();
	if(supportVAOs && vaoID!=0){
		releaseVAO(vaoID);
		vaoID=0;
	}
	bAllocated		= false;
	#if defined(TARGET_ANDROID) || defined(TARGET_OF_IOS)
		unregisterVbo(this);
	#endif
}
Exemplo n.º 5
0
//--------------------------------------------------------------
void ofVbo::clear(){

	// clear all fixed function attributes
	
	clearVertices();
	clearColors();
	clearNormals();
	clearTexCoords();
	
	// we're not using any of these.
	bUsingVerts = false;
	bUsingColors = false;
	bUsingNormals = false;
	bUsingTexCoords = false;

	// clear all custom attributes.
	customAttributes.clear();
	
	clearIndices();
	if(vaoID!=0){
		releaseVAO(vaoID);
		vaoID=0;
	}
}