Autor Beitrag
Green
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Fr 04.08.06 18:30 
Kann mir jemand verraten wie ich mit OpenGL eine Kugel zaubere? Ich hab die Forensuche schon benutzt und absolut nix bis auf folgenden komentar gefunden:

user profile iconMathiasH hat folgendes geschrieben:
guck die mal glTranslate genauer an :)


Hat jemand mir ne Idee was das mit glTranslate zu tun hat? und vor allem, wie ich jetzt eine Kugel auf den Schildbirm krieg?
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 04.08.06 18:33 
das hat nichts mit glTranslatef zu tun
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
procedure DrawSphere(CX, CY, CZ, Radius: TGLFloat);
var
  quad: PGLUQuadric;
begin
  Texture.Bind;
  quad := gluNewQuadric;
  try
    gluQuadricTexture(quad, True);
    glPushMatrix; // Matrix sichern
      glTranslatef(cx,cy,cz);
      gluSphere(quad, Radius, 3232);
    glPopMatrix;
  finally
    gluDeleteQuadric(quad);
  end;
  Texture.Unbind;
end;
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Fr 04.08.06 21:25 
Danke das funzt soweit, bisauf des Textur.bind und unbind... was is das denn?
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 04.08.06 23:22 
die texture, kannst du weglassen wenn du keine brauchst
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Sa 05.08.06 10:06 
Das das die Textur is hab ich mir schon gedacht :D

Nur wie verwende ich die? also was is das für ein Objekt? Wie krieg ich auf die Kugel jetzt meine Textur drauf, und wie kann ich die jetzt bearbeiten? So?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
glMatrixMode(GL_TEXTURE);
  glLoadIdentity;
  glTranslatef(x,0,0);
glMatrixMode(GL_MODELVIEW);
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.08.06 11:34 
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Sa 05.08.06 11:50 
Toll... auf der Seite bin ich ja die ganze zeit, aber ich finde keine Erklärung wie ich jetzt ne Textur auf eine Kugel krieg...
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 05.08.06 13:29 
du solltest dir vielleicht auch erstmal die anfänger tutorials durcharbeiten, dann weißt du es
Green Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 283

Windows XP Home
Delphi 6 Enterprise
BeitragVerfasst: Sa 05.08.06 13:33 
Hab sie alle durchgearbeitet, und auch schon die Textur drufgekriegt, aber es laggt unglaublich!!! (Neuer Thread!!!)