- Changed terrain rendering from GL_TRIANGLES to GL_QUADS to fix coastlines and other overlapping (thanks Turley)

This commit is contained in:
Andreas Schneider 2009-06-11 14:41:30 +02:00
parent 7fdfd1ee23
commit 31d2623df9
2 changed files with 5 additions and 11 deletions

View File

@ -532,9 +532,7 @@ object frmMain: TfrmMain
Height = 25
Top = 0
Width = 152
AutoComplete = False
ItemHeight = 0
ItemWidth = 0
OnChange = cbRandomPresetChange
Style = csDropDownList
TabOrder = 0

View File

@ -1694,19 +1694,15 @@ begin
if blockInfo^.HighRes <> nil then
begin
glBindTexture(GL_TEXTURE_2D, blockInfo^.HighRes.Texture);
glBegin(GL_TRIANGLES);
glNormal3fv(@blockInfo^.Normals^[3]);
glTexCoord2f(0, 1); glVertex2fv(@blockInfo^.DrawQuad[3]);
glBegin(GL_QUADS);
glNormal3fv(@blockInfo^.Normals^[0]);
glTexCoord2f(0, 0); glVertex2fv(@blockInfo^.DrawQuad[0]);
glNormal3fv(@blockInfo^.Normals^[1]);
glTexCoord2f(1, 0); glVertex2fv(@blockInfo^.DrawQuad[1]);
glNormal3fv(@blockInfo^.Normals^[1]);
glTexCoord2f(1, 0); glVertex2fv(@blockInfo^.DrawQuad[1]);
glNormal3fv(@blockInfo^.Normals^[2]);
glTexCoord2f(1, 1); glVertex2fv(@blockInfo^.DrawQuad[2]);
glNormal3fv(@blockInfo^.Normals^[3]);
glTexCoord2f(0, 1); glVertex2fv(@blockInfo^.DrawQuad[3]);
glNormal3fv(@blockInfo^.Normals^[2]);
glTexCoord2f(1, 1); glVertex2fv(@blockInfo^.DrawQuad[2]);
glNormal3fv(@blockInfo^.Normals^[1]);
glTexCoord2f(1, 0); glVertex2fv(@blockInfo^.DrawQuad[1]);
glEnd;
end else
begin