Beispiel #1
0
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");
	}
}
Beispiel #2
0
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();
}