Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
Delphi 6 Personal
|
Re: GLScene - GLCanvas und TextOut
19. Okt 2005, 01: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. }
|
|
Zitat
|