From 31d2623df94c8142f5182519e62d749f74cd78fd Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 11 Jun 2009 14:41:30 +0200 Subject: [PATCH] - Changed terrain rendering from GL_TRIANGLES to GL_QUADS to fix coastlines and other overlapping (thanks Turley) --- Client/UfrmMain.lfm | 2 -- Client/UfrmMain.pas | 14 +++++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Client/UfrmMain.lfm b/Client/UfrmMain.lfm index 143ed3b..950b37b 100644 --- a/Client/UfrmMain.lfm +++ b/Client/UfrmMain.lfm @@ -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 diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index 5390626..2c149e9 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -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