[FONT=Courier New]void ECI_Window::Pacific_Range (void)
{
[SIZE=1]
int h, w, v = -1;
float lat, lon;
static int first_PR = TRUE;
static float vrt[51][51][3], tex[51][51][2];
if (first_PR) {
for (h = 0; h < 51; h++) {
lat = float(h) / 10.0 + 31.0;
for (w = 0; w < 51; w++) {
lon = float(w) / 10.0 + -123.0;
latlon_xyz (1.0, lat, lon, vrt[h][w]);
tex[h][w][0] = float(w) / 50.0;
tex[h][w][1] = float(h) / 50.0;
}
}
first_PR = FALSE;
}
glDisable (GL_BLEND);
glEnable (GL_LIGHTING);
glBindTexture (GL_TEXTURE_2D, textures[6].texID);
glBegin (GL_QUADS);
for (h = 0; h < 50; h++) {
for (w = 0; w < 50; w++) {
glTexCoord2fv (tex[h ][w ]); glNormal3fv (vrt[h ][w ]); glVertex3fv (vrt[h ][w ]);
glTexCoord2fv (tex[h ][w+1]); glNormal3fv (vrt[h ][w+1]); glVertex3fv (vrt[h ][w+1]);
glTexCoord2fv (tex[h+1][w+1]); glNormal3fv (vrt[h+1][w+1]); glVertex3fv (vrt[h+1][w+1]);
glTexCoord2fv (tex[h+1][w ]); glNormal3fv (vrt[h+1][w ]); glVertex3fv (vrt[h+1][w ]);
}
}
glEnd ();
}[/SIZE]
[/FONT]