//-------------------------------------------------------------- static void retainVAO(GLuint id){ if(id==0) return; if(getVAOIds().find(id)!=getVAOIds().end()){ getVAOIds()[id]++; }else{ getVAOIds()[id]=1; } }
//-------------------------------------------------------------- static void releaseVAO(GLuint id){ if(getVAOIds().find(id)!=getVAOIds().end()){ getVAOIds()[id]--; if(getVAOIds()[id]==0){ glDeleteVertexArrays(1, &id); getVAOIds().erase(id); } }else{ ofLogWarning("ofVbo") << "releaseVAO(): something's wrong here, releasing unknown vertex array object id " << id; glDeleteVertexArrays(1, &id); } }
//-------------------------------------------------------------- static void releaseVAO(GLuint id){ if(getVAOIds().find(id)!=getVAOIds().end()){ getVAOIds()[id]--; if(getVAOIds()[id]==0){ #ifdef TARGET_ANDROID if (!ofAppAndroidWindow::isSurfaceDestoryed()) #endif glDeleteVertexArrays(1, &id); getVAOIds().erase(id); } }else{ ofLogWarning("ofVbo") << "releaseVAO(): something's wrong here, releasing unknown vertex array object id " << id; #ifdef TARGET_ANDROID if (!ofAppAndroidWindow::isSurfaceDestoryed()) #endif glDeleteVertexArrays(1, &id); } }