All pastes #901978 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-13 01:59 UTC
rendered paste body
//
// DrawEntireWorld
//
// Draw the WHOLE world,
// ignoring the octree.
//
void DrawEntireWorld (void)
{
/*	int i;

	for (i = 0; i < World::numworldpolys; i++)
		DrawWorldPolygon (&World::worldpolys[i]);*/

	glEnableClientState (GL_TEXTURE_COORD_ARRAY);
	glEnableClientState (GL_NORMAL_ARRAY);
	glEnableClientState (GL_VERTEX_ARRAY);

	glNormalPointer (GL_FLOAT, 0, World::worldnorms);
	glTexCoordPointer (2, GL_FLOAT, 0, World::worlduvs);
	glVertexPointer (3, GL_FLOAT, 0, World::worldverts);

	glDrawArrays (GL_TRIANGLES, 0, World::numworldpolys);

	// Turn everything off for next draw command
	glDisableClientState (GL_VERTEX_ARRAY);
	glDisableClientState (GL_NORMAL_ARRAY);
	glDisableClientState (GL_TEXTURE_COORD_ARRAY);
}