Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#4

AW: GLScene - Rectangle oder Circle hinzufügen

  Alt 30. Jun 2016, 13:26
Ich würde gern sozusagen ein Image im Raum platzieren und finde keine Möglichkeit das zu tun.
Was verstehst du denn unter einem Image? Eine Bitmap?
Denke ich mal
Dafür benötigt man ein Quad kein Rectangle.

Sollte nicht anders als bei OpenGL sein.
bsp:
Delphi-Quellcode:
    glBindTexture(GL_TEXTURE_2D, MyTexture); //MyTexture = Dein Image

    glBegin(GL_QUADS);
       glTexCoord2f(1.0, 0.0); glVertex3f(-x,-y,-z); // Bottom Right Of The Texture And Quad
       glTexCoord2f(1.0, 1.0); glVertex3f(-x, y,-z); // Top Right Of The Texture And Quad
       glTexCoord2f(0.0, 1.0); glVertex3f( x, y,-z); // Top Left Of The Texture And Quad
       glTexCoord2f(0.0, 0.0); glVertex3f( x,-y,-z); // Bottom Left Of The Texture And Quad
    glEnd();

gruss

Geändert von EWeiss (30. Jun 2016 um 13:29 Uhr)
  Mit Zitat antworten Zitat