   GL_TRIANGLE_STRIPS not working
  The first time around I just had a static multidimensional array and the following code worked to render the map.  I want to be able to have a dynamic sized map so I changed the code to load in one big block of data.  I think I'm indexing through the array right to draw the terrain.  But its just strips that aren't connected to any other strips.(x,y) = HeightMap[x + (y * width)]for (mapX = 0; mapX < MapWidth; mapX+=4){ for (mapZ = 0; mapZ < MapHeight; mapZ+=4){ glBindTexture(GL_TEXTURE_2D, texture[0]);   glBegin(GL_TRIANGLE_STRIP);Height = HeightMap[mapX+(mapZ*MapWidth)];glTexCoord2f(0,0); glVertex3f(float(mapX),Height,float(mapZ));Height = HeightMap[mapX+(mapZ*MapWidth+4)];glTexCoord2f(0,1); glVertex3f(float(mapX),Height,float(mapZ+4));Height = HeightMap[(mapX+4)+(mapZ*MapWidth)];glTexCoord2f(1,0); glVertex3f(float(mapX+4),Height,float(mapZ));Height = HeightMap[(mapX+4)+(mapZ*MapWidth+4)];glTexCoord2f(1,1); glVertex3f(float(mapX+4),Height,float(mapZ+4));glEnd();}}
  I think the second and fourth vertices should have ((mapZ+4)*MapWidth) in the index instead of (mapZ*MapWidth+4).  And what is 4?  Assuming HeightMap is just an array of individual values for each height I think those should all be 1 (even in the loop incrementing).This is very inefficient the way it is right now.  First, move that texture binding out of both loops.  After that a slightly better approach is to make one strip out of each row (you're going column-by-column, so each column for you) and move the glBegin/glEnd outside the inner loop.  An even better approach is to make the entire map one strip by connecting each row (column) with degenerate triangles.  Even better is to use vertex arrays.  Better than that is to use an indexed triangle list (not strip, although there's some debate over that) in a cache-friendly order.  The "best" way is to put that cache-friendly, indexed triangle list into a VBO.It's also probably better to be looping row-by-row so that you minimize cache misses on the CPU.   ;  Yeah its supposed to be ((mapZ+4)*MapWidth).  That made the map display properly but now I have artifacts at the far edges of the map.  I was using the increment of four because I was just following this tutorial:  http://www.swiftless.cdadc.com/tutorials/opengl/heightmap.html.  Was binding the texture in the loop because I was doing some simple texturing based on height.  Are there any other idiot friendly tutorials besides NeHe's and the I posted?   