LAMW: 3D Perspective view on jCanvasES2 lazarus / 43-Android ---------------------------------------------------------------------- Handoko · 2016-06-11 11:31 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    jCanvasES2_1.Screen_Setup(scrW, scrH, xp3D, False); And if I look inside the Screen_Setup, I found this code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Case Projection of   xp2D : begin           glMatrixMode  (GL_PROJECTION);           glLoadIdentity();          end;   xp3D : _gluPerspective(cfieldOfView,w/h,czNear,czFar);  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? ---------------------------------------------------------------------- Seenkao · 2022-03-29 15:08 По сути это не полный код и непонятно как полностью создаётся матрица 3D проекции. Потренируйтесь на обычном OpenGL для того чтоб понимать как всё происходит и как работать с OpenGL. Когда будет работа с шейдерами, там вообще всё может быть не так. Код скидывал, но здесь продублирую, как должно выглядеть. Можно попробовать и проверить: google translate: In fact, this is not a complete code and it is not clear how the 3D projection matrix is completely created. Practice with regular OpenGL in order to understand how everything works and how to work with OpenGL. When there is work with shaders, everything can be different there. I threw off the code, but here I will duplicate how it should look. You can try and check: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   glMatrixMode(GL_PROJECTION);  glLoadIdentity();  gluPerspective(oglFOVY, oglWidth / oglHeight, oglzNear, oglzFar);  glMatrixMode(GL_MODELVIEW);  glLoadIdentity(); ---------------------------------------------------------------------- Handoko · 2022-03-29 15:44 I will try it. Thank you.