void draw() { if(m_material) { m_material->bind(); } glDrawElements(GL_TRIANGLES, m_count, GL_UNSIGNED_INT, m_startPtr); }
void CPropResource::draw() { unsigned short pid; CMaterial material; if(m_materialResources.size()) { m_multiMeshResource->bind(); pid = 0; material = m_materialResources[0]; material->bind(); while((pid = m_multiMeshResource->draw(m_meshId, pid))) { if(pid < m_materialResources.size()) { material = m_materialResources[pid]; material->bind(); } } } }