Einzelnen Beitrag anzeigen

Peter666

Registriert seit: 11. Aug 2007
357 Beiträge
 
#4

AW: OpenGL und Firemonkey

  Alt 22. Mai 2013, 19:21
Okay manchmal ist man wirklich dämlich, ich beantworte mir das mal selber

Delphi-Quellcode:
{$IFDEF USEQUADS}
  glBegin(GL_QUADS);
  glTexCoord2f(tr.Left, tr.Top);
  glVertex2F(vr.Left, vr.Top);
  glTexCoord2f(tr.Left, tr.Bottom);
  glVertex2F(vr.Left, vr.Bottom);
  glTexCoord2f(tr.Right, tr.Bottom);
  glVertex2F(vr.Right, vr.Bottom);
  glTexCoord2f(tr.Right, tr.Top);
  glVertex2F(vr.Right, vr.Top);
  glEnd();
{$ELSE}
  glBegin(GL_TRIANGLES);
  glTexCoord2f(tr.Left, tr.Top);
  glVertex2F(vr.Left, vr.Top);
  glTexCoord2f(tr.Left, tr.Bottom);
  glVertex2F(vr.Left, vr.Bottom);
  glTexCoord2f(tr.Right, tr.Top);
  glVertex2F(vr.Right, vr.Top);

  glTexCoord2f(tr.Left, tr.Bottom);
  glVertex2F(vr.Left, vr.Bottom);
  glTexCoord2f(tr.Right, tr.Bottom);
  glVertex2F(vr.Right, vr.Bottom);
  glTexCoord2f(tr.Right, tr.Top);
  glVertex2F(vr.Right, vr.Top);
  glEnd();
{$ENDIF}
  Mit Zitat antworten Zitat