Пример #1
0
void
display(void)
{
  glClear(GL_COLOR_BUFFER_BIT);
  drawmesh(MAXMESH, MAXMESH);
  glutSwapBuffers();
}
Пример #2
0
void drawmeshes(Array<DataMesh*> &meshes)
{
	for(int i=0;i<meshes.count;i++)
	{
		DataMesh *mesh=meshes[i];
		drawmesh(mesh);		
	}
}
Пример #3
0
static void
display(void) {
    glClear(GL_COLOR_BUFFER_BIT);
    loadtiles();
    if (texture) {
	drawtexture();
    } else {
	drawmesh(64,64);
	if (grid) showgrid();
    }
    glutSwapBuffers();
}
Пример #4
0
void drawmeshes_spherecull(Array<DataMesh*> &meshes,const float3 &sphere_worldpos,float sphere_radius)
{
	for(int i=0;i<meshes.count;i++)
	{
		DataMesh *mesh=meshes[i];
		if(spherecull && !meshintersectsphere(mesh,sphere_worldpos,sphere_radius))
		{
			culledmeshcount++;
			continue;
		}
		drawmesh(mesh);		
	}
}
Пример #5
0
void
display(void) {
    glClear(GL_COLOR_BUFFER_BIT);
    glMatrixMode(GL_TEXTURE);
    glPushMatrix();
    glTranslatef(.5f, .5f, .5f);
    glRotatef(trotx, 0.f, 0.f, 1.f);
    glScalef(tscale, tscale, tscale);
    glTranslatef(-.5f, -.5f, -.5f);
    glMatrixMode(GL_MODELVIEW);
    glPushMatrix();
    glRotatef(rotx, 0.f, 0.f, 1.f);
    glScalef(scale, scale, scale);
    drawmesh(64,64);
    glPopMatrix();
    glMatrixMode(GL_TEXTURE);
    glPopMatrix();
    glMatrixMode(GL_MODELVIEW);
    glutSwapBuffers();
}