Exemplo n.º 1
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
}
//--------------------------------------------------------------
void ofVboByteColor::clear(){
	clearVertices();
	clearNormals();
	clearColors();
	clearTexCoords();
	clearIndices();
}
Exemplo n.º 3
0
void Highlighter::updateHighlight()
{
    if (!m_renderer)
    {
        clear();
        return;
    }
    if (!m_selection.visualization || m_selection.indices.empty())
    {
        clearIndices();

        emit geometryChanged();

        return;
    }

    switch (m_selection.indexType)
    {
    case IndexType::points:
        highlightPoints();
        break;
    case IndexType::cells:
        highlightCells();
        break;
    case IndexType::invalid:
    default:
        return;
    }

    if (m_flashAfterSetTarget)
    {
        flashTargets();
    }
}
Exemplo n.º 4
0
void Highlighter::clear()
{
    clearIndices();

    setTargetInternal(VisualizationSelection());

    m_renderer = nullptr;
}
Exemplo n.º 5
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.º 6
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;
	}
}
Exemplo n.º 7
0
void Model::makeBall(float radius, size_t step, size_t rstep, const glm::vec3 &center) {
    clearVertices();
    clearIndices();
    setPrimitive(GLTriangles);
    addBall(radius, step, rstep, center);
}
Exemplo n.º 8
0
void Model::makeBox(const glm::vec3 &size, const glm::vec3 &center, const glm::vec4 &texRect) {
    clearVertices();
    clearIndices();
    setPrimitive(GLTriangles);
    addBox(size, center, texRect);
}
Exemplo n.º 9
0
void Model::makePlane(const glm::vec3 &a, const glm::vec3 &b, const glm::vec3 &c, const glm::vec4 &texRect) {
    clearVertices();
    clearIndices();
    setPrimitive(GLTriangles);
    addPlane(a, b, c, texRect);
}