OpenGL Super Bible! Page 473 height = TerrainHeight[0]; (Mac os x web server)
OpenGL Super Bible! Page 473 height = TerrainHeight[0]; glPushName(0); for (y = 0; y < (TERRAIN_SIZE - 1); y ++, height ++) { glLoadName(y); glPushName(0); for (x = 0; x < (TERRAIN_SIZE - 1); x ++, height ++) { glLoadName(x); glBegin(GL_POLYGON); glVertex3f((GLfloat)(x - TERRAIN_EDGE), height[0], (GLfloat)(y - TERRAIN_EDGE)); glVertex3f((GLfloat)(x - TERRAIN_EDGE), height[TERRAIN_SIZE], (GLfloat)(y - TERRAIN_EDGE + 1)); glVertex3f((GLfloat)(x - TERRAIN_EDGE + 1), height[1], (GLfloat)(y - TERRAIN_EDGE)); glVertex3f((GLfloat)(x - TERRAIN_EDGE + 1), height[TERRAIN_SIZE + 1], (GLfloat)(y - TERRAIN_EDGE + 1)); glEnd(); }; glPopName(); }; glPopName(); glPopMatrix(); glFinish(); /* * Get the 'hits in the selection buffer */ count = glRenderMode(GL_RENDER); for (i = 0; i < count; i += 3) { if (buffer[i] == 0) continue; /* * Each 'hit will contain the following parameters: * * 0 - count (2) * 1 - Z minimum value * 2 - Z maximum value * 3 - Y location in terrain * 4 - X location in terrain */ x = buffer[i + 4]; y = buffer[i + 3];
We recommend high quality webhost to host and run your jsp application: christian web host services.