void display(void) { glClear(GL_COLOR_BUFFER_BIT); drawmesh(MAXMESH, MAXMESH); glutSwapBuffers(); }
void drawmeshes(Array<DataMesh*> &meshes) { for(int i=0;i<meshes.count;i++) { DataMesh *mesh=meshes[i]; drawmesh(mesh); } }
static void display(void) { glClear(GL_COLOR_BUFFER_BIT); loadtiles(); if (texture) { drawtexture(); } else { drawmesh(64,64); if (grid) showgrid(); } glutSwapBuffers(); }
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); } }
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(); }