Recent

Author Topic: LAMW: 3D Perspective view on jCanvasES2  (Read 1540 times)

Handoko

  • Hero Member
  • *****
  • Posts: 3913
  • My goal: build my own game engine using Lazarus
LAMW: 3D Perspective view on jCanvasES2
« on: June 11, 2016, 01:31:01 pm »
The 3D perspective on jCanvasES2 doesn't look correctly, it's more looks like isometric view.

The difference about perspective and isometric view is explained here:
http://encyclopedia2.thefreedictionary.com/isometric+view

I'm learning how to use OpenGL ES2 on LAMW. The best example is .../demos/Eclipse/AppDemo1 (unit13.pas). On the DoDraw procedure (called by jCanvas2_1.OnGLDraw event) has this line:
Code: Pascal  [Select][+][-]
  1.    jCanvasES2_1.Screen_Setup(scrW, scrH, xp3D, False);

And if I look inside the Screen_Setup, I found this code:
Code: Pascal  [Select][+][-]
  1.   Case Projection of
  2.    xp2D : begin
  3.            glMatrixMode  (GL_PROJECTION);
  4.            glLoadIdentity();
  5.           end;
  6.    xp3D : _gluPerspective(cfieldOfView,w/h,czNear,czFar);
  7.   End;

Which mean it should be showing 3D perspective view. But if I run the demo, what I get is isometric view.

Is it a bug? Or perhaps OpenGL ES2 perspective view hasn't fully implemented yet in LAMW?
« Last Edit: June 11, 2016, 01:35:21 pm by Handoko »

 

TinyPortal © 2005-2018