Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   AVI setzt sich nicht auf richtige position (https://www.delphipraxis.net/155745-avi-setzt-sich-nicht-auf-richtige-position.html)

EWeiss 5. Nov 2010 20:26


AVI setzt sich nicht auf richtige position
 
Hab ne kleine Animation erstellt und als AVI abgespeichert.
Da Render ich jetzt jedes Frame in eine Texture.

Seltsamer weise bekomme ich die Texture nicht auf die richtige position.

Was läuft hier falsch ?

Delphi-Quellcode:
    gluLookAt(0.0, 0.0, 15.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);

    glEnable(GL_LIGHTING);
    glEnable(GL_BLEND);

    // Hintergrund zeichnen
    glBindTexture(GL_TEXTURE_2D, DanceTex[3].Texture);
    glBegin(GL_QUADS);
      glColor4ub(60,60,64,64);
      glTexCoord2f(0, 1); glVertex3f(-8.34, 6.8, -0);
      glTexCoord2f(1, 1); glVertex3f(8.34, 6.8, -0);
      glTexCoord2f(1, 0); glVertex3f(8.34, -6.8, -0);
      glTexCoord2f(0, 0); glVertex3f(-8.34, -6.8, -0);
    glEnd();

    RGBColor := LevelColr(nValue);
    cbR := GetRValue(RGBColor);
    cbG := GetGValue(RGBColor);
    cbB := GetBValue(RGBColor);
    glColor4ub(cbR , cbG , cbB, 64);

    glBindTexture(GL_TEXTURE_2D, DanceTex[3].Texture);
    glBegin(GL_QUADS);
      glTexCoord2f(0, 1); glVertex3f(-8.34, 6.8, -0);
      glTexCoord2f(1, 1); glVertex3f(8.34, 6.8, -0);
      glTexCoord2f(1, 0); glVertex3f(8.34, -6.8, -0);
      glTexCoord2f(0, 0); glVertex3f(-8.34, -6.8, -0);
    glEnd();

    glLoadIdentity();
    glTranslatef(0.0, -0.7, -7.5);
    GetAVIFrame;
    glBindTexture(GL_TEXTURE_2D, VidTexture);
    glPushMatrix();
      glBegin(GL_QUADS);
        glNormal3f(0, 0, 1);
        glTexCoord2f(0, 1); glVertex3f(-2.34, 2.8, 0);
        glTexCoord2f(1, 1); glVertex3f(2.34, 2.8, 0);
        glTexCoord2f(1, 0); glVertex3f(2.34, -2.8, 0);
        glTexCoord2f(0, 0); glVertex3f(-2.34, -2.8, 0);
      glEnd;
    glPopMatrix();

    glDisable (GL_LIGHTING);
vielleicht erkennt jemand woran es liegt.

Deaktiviere ich den Hintergrund dann wird die Puppe auf der richtige position gesetzt.
Also irgendetwas muss ich da vergessen haben?

gruss

EWeiss 6. Nov 2010 12:58

AW: AVI setzt sich nicht auf richtige position
 
Hat sich erledigt funktioniert nun einwandfrei..

gruss

EWeiss 6. Nov 2010 21:32

AW: AVI setzt sich nicht auf richtige position
 
Wer sich mein neues Plugin ansehen will hier ist der Link zu einem Movie

http://www.youtube.com/watch?v=zBv6U5IIdAI

gruss


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:16 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz