コード例 #1
0
ファイル: renderable.cpp プロジェクト: FlavScheidt/bcc
void Renderable::draw()
{
	switch(mNumIndicesPerElement)
	{
	case 0:
		// this "pseudo" case is handled by triangle drawer (point cloud w/o indices)
		drawTriangleMesh();
		break;

	case 1:
		LOG("native point rendering not implemented yet");
		break;
		
	case 2:
		drawLineList();
		break;

	case 3:
		drawTriangleMesh();
		break;

	case 4:
		LOG("native quad rendering not implemented yet");

	default:
		LOG("number of indices per primitive not specified");
	}
}
コード例 #2
0
ファイル: list.cpp プロジェクト: hugodionizio/UFERSAGE
void displayList(void) {
	GLuint i;

	glClear(GL_COLOR_BUFFER_BIT);
	glColor3f(0.0, 1.0, 0.0); /*  current color green  */
	for (i = 0; i < 10; i++) /*  draw 10 triangles    */
		glCallList(listName);
	drawLineList(); /*  is this line green?  NO!  */
	/*  where is the line drawn?  */
	glFlush();
}