Firemonkey, OpengGL API and TContext

  

Moving a simulator from OpenGL & Delphi 7 to Seattle & Firemonkey I can not find an “Injection Point” to act on the self created Firemonkey Context (TContex3D) where I can code free hand using the whole OpenGL features, primitives and procedures

procedure ILS_Draw(i:Integer); // D7
begin
if Length(ATCS_ILS)=0
then Exit;
glDisable(GL_DEPTH_TEST);
glDisable(GL_FOG);
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glDisable(GL_LIGHTING);
glColor4f(0.5, 0.5, 0.9, 0.7 );
glLineWidth(0.4); // actually not here but on the list definition
if ATCS_ILS[i].f_ILS_Ring_Draw
then glCallList( ATCS_ILS[i].f_ILS_Ring_ID_List_2 );
glColor4d(1,1,1,1);
glEnable(GL_DEPTH_TEST);
glEnable(GL_FOG);
glEnable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
glEnable(GL_LIGHTING);
end;

It looks like that all can be done is this:

procedure TMain_Form.Draw_My_Scene; // Seattle
Var a:Integer;
c:TAlphaColor;
s,e: TPoint3D;
LocWP:IViewport3D;
begin
a:=0;
c:=TAlphaColors.Black;
LocWP:=Viewport3D1;
if High(MyPoints)>1 then begin
for a := 1+Low(MyPoints) to High(MyPoints) do begin
LocWP.Context.DrawLine( MyPoints[a-1],
MyPoints[a],1,c);
// Alternatively FillCube, FillPolygon, DrawRect,
// DrawCube. But this is not much.
end;
end;
end;

Also changing size and pattern of line is not possible !!!
So it looks like impossible coding using OpenGL Procedures.

Any suggestion or Firemonkey is a perfect tool to draw a cube ?
Thanks everybody.

Comments are closed.