Einzelnen Beitrag anzeigen

Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#3

Re: GLScene - GLCanvas und TextOut

  Alt 19. Okt 2005, 00:31
Delphi-Quellcode:
procedure TForm1.GLDirectOpenGL1Render(Sender: TObject;
  var rci: TRenderContextInfo);
var
  OGLCanvas: TGLCanvas;
  x,y,i: integer;
begin

  x:=GLSceneViewer1.Width-1;
  y:=GLSceneViewer1.Height-1;
  OGLCanvas:=TGLCanvas.Create(x,y);
  OGLCanvas.PenColor:=clYellow;
  OGLCanvas.PenAlpha:=1;
  OGLCanvas.PenWidth:=1;

  GLWindowsBitmapFont1.TextOut(rci,20,20,'text', clred);

  for i:=0 to 10 do
  begin
    OGLCanvas.StopPrimitive; // <---<<< ruf den mal vorher auf.
    GLWindowsBitmapFont1.TextOut(rci,random(100),random(100),'hello',Random(256*256*256));

    OGLCanvas.MoveTo(i*10,0);
    OGLCanvas.LineTo(i*10,y);
  end;

  OGLCanvas.Free;
end;

Zitat:
{: Stops the current internal primitive.


This function is invoked automatically by TGLCanvas when changeing
primitives, you should directly call if you want to render your
own stuff intertwined with TGLCanvas drawings. In that case, call
it before your own OpenGL calls. }
Miniaturansicht angehängter Grafiken
image1_125.png  
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat