Einzelnen Beitrag anzeigen

venice2
(Gast)

n/a Beiträge
 
#9

AW: Alle seiten mit Texture füllen

  Alt 27. Aug 2020, 13:36
Funktioniert jetzt.

Delphi-Quellcode:
        glBegin(GL_TRIANGLES);
          //Up
          glColor4ub(R2, G2, B2, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, 1.414, 0.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.0, 0.0); glVertex3d(-1.0, 0.0, 1.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(1.0, 0.0, 1.0);

          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, 1.414, 0.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(1.0, 0.0, 1.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(1.0, 0.0); glVertex3d(1.0, 0.0, -1.0);

          glColor4ub(R2, G2, B2, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, 1.414, 0.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.0, 0.0); glVertex3d(1.0, 0.0, -1.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(-1.0, 0.0, -1.0);

          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, 1.414, 0.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(-1.0, 0.0, -1.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(1.0, 0.0); glVertex3d(-1.0, 0.0, 1.0);

          //Down
          glColor4ub(R2, G2, B2, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, -1.414, 0.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.0, 0.0); glVertex3d(1.0, 0.0, 1.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(-1.0, 0.0, 1.0);

          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, -1.414, 0.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(-1.0, 0.0, 1.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(1.0, 0.0); glVertex3d(-1.0, 0.0, -1.0);

          glColor4ub(R2, G2, B2, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, -1.414, 0.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.0, 0.0); glVertex3d(-1.0, 0.0, -1.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(1.0, 0.0, -1.0);

          glColor4ub(R1, G1, B1, 64); glTexCoord2f(0.5, 1.0); glVertex3d(0.0, -1.414, 0.0);
          glColor4ub(0, 0, 0, 64); glTexCoord2f(0.5, 0.0); glVertex3d(1.0, 0.0, -1.0);
          glColor4ub(R1, G1, B1, 64); glTexCoord2f(1.0, 0.0); glVertex3d(1.0, 0.0, 1.0);
        glEnd();
falls es mal jemand braucht.
Danke an "Michal Bubnár"

Geändert von venice2 (20. Okt 2020 um 12:13 Uhr)
  Mit Zitat antworten Zitat