//-------------------------------------------------------------- void ofVboByteColor::clear(){ clearVertices(); clearNormals(); clearColors(); clearTexCoords(); clearIndices(); }
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_); } }
//-------------------------------------------------------------- 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 }
//-------------------------------------------------------------- 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 }
//-------------------------------------------------------------- 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; } }