Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Fehler bei positionierung von Hinterdrundbild (https://www.delphipraxis.net/88973-fehler-bei-positionierung-von-hinterdrundbild.html)

EWeiss 23. Mär 2007 20:03


Fehler bei positionierung von Hinterdrundbild
 
Hallo
Habe ein Problem bei der Positionierung des Hintergrundbild in OpenGl

Delphi-Quellcode:
procedure ReSizeGLScene(glsWidth : GLsizei; glsHeight: GLsizei);
begin
    If glsHeight = 0 Then                    // Prevent A Divide By Zero By
        glsHeight := 1;                      // Making Height Equal One

    glViewport(0, 0, glsWidth, glsHeight);   // Reset The Current Viewport
    glMatrixMode(GL_PROJECTION);             // Select The Projection Matrix
    glLoadIdentity;                          // Reset The Projection Matrix
    gluPerspective(45, glsWidth / glsHeight, 0.1, 100);
    glMatrixMode(GL_MODELVIEW);              // Select The Modelview Matrix
    glLoadIdentity;                          // Reset The Modelview Matrix

End;
Die procedure sollte so stimmen..
Mein Bild ist 640x480 24.bit TGA
Es setzt sich aber nicht an die 0,0 position im Viewport.
Es liegt immer 38 Pixel tiefer

Die Form hat die gleichen ausmaße

Woran könnte das liegen bzw.. wie kann ich es richtig positionieren?

EDIT: Hat sich erledigt

gruss Emil


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:35 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