glPushMatrix (); glTranslatef (w->attrib.x + (w->width / 2), w->attrib.y + (w->height / 2), 0.0); if (w->width < w->height) glScalef (w->width, w->width, 1.0 / ((float)s->width / (float)w->width)); else glScalef (w->height, w->height, 1.0 / ((float)s->height / (float)w->height)); // Draw a circle here with radius 0.5 glBegin (GL_LINE_LOOP); glVertex3f (-0.5, 0.5, 0.0); glVertex3f (-0.5, -0.5, 0.0); glVertex3f (0.5, -0.5, 0.0); glVertex3f (0.5, 0.5, 0.0); glEnd (); glPushMatrix (); glRotatef (90.0, 1.0, 0.0, 0.0); glBegin (GL_LINE_LOOP); glVertex3f (-0.5, 0.5, 0.0); glVertex3f (-0.5, -0.5, 0.0); glVertex3f (0.5, -0.5, 0.0); glVertex3f (0.5, 0.5, 0.0); glEnd (); glPopMatrix (); glRotatef (90.0, 0.0, 1.0, 0.0); glBegin (GL_LINE_LOOP); glVertex3f (-0.5, 0.5, 0.0); glVertex3f (-0.5, -0.5, 0.0); glVertex3f (0.5, -0.5, 0.0); glVertex3f (0.5, 0.5, 0.0); glEnd (); glPopMatrix ();