Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#1

Form setzt sich nicht wie angegeben

  Alt 13. Mär 2007, 10:01
Warum setzt sich meine Form nicht auf die von mir aus einer
anderen *.pas übergebenen position.

Ich möchte das sich diese auf die größe meines Viewport setzt.

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
    fWidth := glsWidth;
    fHeight := glsHeight;

    if not assigned(VisForm) then
      VisForm := TVisForm.Create(nil);

    VisForm.width := fWidth;
    VisForm.height := fHeight;
End;
Der Viewport nimmt die richtige größe an die Form aber nicht.

gruss Emil
  Mit Zitat antworten Zitat