예제 #1
0
/*
* RB_DrawElements_
*/
static void RB_DrawElements_( int firstVert, int numVerts, int firstElem, int numElems )
{
	if( !numVerts || !numElems ) {
		return;
	}

	assert( rb.currentShader != NULL );

	rb.drawElements.numVerts = numVerts;
	rb.drawElements.numElems = numElems;
	rb.drawElements.firstVert = firstVert;
	rb.drawElements.firstElem = firstElem;

	RB_EnableVertexAttribs();

	if( rb.triangleOutlines ) {
		if( !qglPolygonMode ) {
			// OpenGL ES systems don't support glPolygonMode
			return;
		}
		RB_DrawOutlinedElements();
	} else {
		RB_DrawShadedElements();
	}
}
예제 #2
0
파일: r_backend.c 프로젝트: DenMSC/qfusion
/*
* RB_DrawElements_
*/
static void RB_DrawElements_( void )
{
    if ( !rb.drawElements.numVerts || !rb.drawElements.numElems ) {
        return;
    }

    assert( rb.currentShader != NULL );

    RB_EnableVertexAttribs();

    if( rb.triangleOutlines ) {
        RB_DrawOutlinedElements();
    } else {
        RB_DrawShadedElements();
    }
}