GLfloat qw = QW, qh = QH; /* for the quad we'll draw */
GLfloat qx = -6 , qy = 6;
int mono = 0, wire = 0, ticks = 0;
+GLuint screentexture;
typedef struct {
GLint WindH, WindW;
if(!shadow) {
glBegin(GL_POINTS);
- glColor3fv(mono ? MaterialGray6 : MaterialRed);
+ glColor3fv(mono ? MaterialGray6 : MaterialGray5);
glVertex3f(0.40, 0.70, 0.40);
glVertex3f(0.40, 0.70, -0.40);
glEnd();
if(!shadow) {
glBegin(GL_POINTS);
- if(mono)
- glColor3fv(MaterialGray8);
- else
- glColor3fv(MaterialMagenta);
+ glColor3fv(MaterialGray5);
glVertex3f(-0.20 + 0.05 * cos1, 0.25 + 0.1 * sin1, 0.45);
glVertex3f(-0.20 + 0.05 * cos2, 0.00 + 0.1 * sin2, 0.45);
glVertex3f(-0.20 + 0.05 * cos3, -0.25 + 0.1 * sin3, 0.45);
if((quadObj = gluNewQuadric()) == 0)
return False;
- gluQuadricDrawStyle(quadObj, (GLenum) GLU_SILHOUETTE);
+ gluQuadricDrawStyle(quadObj, (GLenum) GLU_LINE);
gluSphere(quadObj, radius, 16, 8);
gluDeleteQuadric(quadObj);
double centertex[2];
glEnable(GL_TEXTURE_2D);
+ glBindTexture(GL_TEXTURE_2D, screentexture);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, MaterialGray6);
/* draw mesh */
ant->goal[1] = 0.0;
ant->goal[2] = random()%((int)(boardsize+0.5)-2) - boardsize/2.0 + 1.0;
}
- while(distance(ant->position, ant->goal) < 1.0);
+ while(distance(ant->position, ant->goal) < 2.0);
}
/* construct our ant */
else
MI_CLEARWINDOW(mi);
+ glGenTextures(1, &screentexture);
+ glBindTexture(GL_TEXTURE_2D, screentexture);
get_snapshot(mi);
+
build_ant();
mono = MI_IS_MONO(mi);
wire = MI_IS_WIREFRAME(mi);
/* position camera */
/* follow focused ant */
- glTranslatef(0.0, 0.0, -10.0 - mag);
+ glTranslatef(0.0, 0.0, -6.0 - mag);
glRotatef(35.0, 1.0, 0.0, 0.0);
gltrackball_rotate(mp->trackball);
glTranslatef(-ant->position[0], ant->position[1], -ant->position[2]);