Autor Beitrag
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 02.05.08 15:48 
So ich muss zugeben ich bin ein Openglnub (zumindest wenn ich nen eigenes ogl Prog erstellen will).
Ich hab es hinbekommen all das zu zeichnen was ich will aber das Bild flackert.

Benutzt hab ich die dglopengl.pas von delphigl.com

Ich hab eine Komponente (von TPanel) abgeleitet und im on Create ruf ich folgendes auf:

ausblenden Delphi-Quelltext
1:
2:
  FDC:= GetDc(Handle); //oder canvas.handle
  FRC := CreateRenderingContext(FDC, [opDoubleBuffered], 16160000);


In OnPaint dann:
ausblenden Delphi-Quelltext
1:
  SwapBuffers(FDC);					


DoublBuffered ist NICHT gesetzt (im TPanel, nur in der Form), wenn ich das in Create setzte dann wird nichts mehr angezeigt. Warum?

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
uall@ogc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Fr 02.05.08 16:06 
habs gefunden:

SetParentBackground(false) im OnCreate aufrufen und es geht :)

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Sa 03.05.08 13:17 
Ähm, irgendwas machst du falsch...

OpenGL ist schon Doublebuffered ([opDoubleBuffered])... noch ein Buffer macht da recht wenig Sinn.

Oder hab ich das falsch verstanden?

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."