I'm not sure. gluLookAt was written a decade ago because linux
could not call any api with more than 8 double parameters. 
It was ported to J8 two years ago.

Opengl matrix in J8 should be row-order and pre-multiplication.
I cannot recall how I checked the implementation.

Пн, 06 апр 2015, Jim Uhl написал(а):
> JVERSION 
> Engine: j803/2014-10-19-11:11:11 
> Library: 8.03.13 
> Qt IDE: 1.3.1/4.8.2 
> Platform: Linux 32 
> Installer: J803 install 
> InstallPath: /home/juhl/j803 
> 
> api/gles version 1.0.21 
> -- 
> The current header of gl_Ortho: 
>   gl_Ortho=: 3 : 0 
> looks like it should be: 
>   gl_Ortho=: (gl_I'')&$: : (4 : 0) 
> The suggested change makes it match gl_Frustum
> and allows it to be used both dyadically and monadically.
> The original verb fails because it refers to x.
> 
> After much puzzling, I think glu_LookAt may be broken
> - the following version matches my understanding
> of how this verb should behave, based on the
> gluLookAt function in OpenGL:
> 
> glu_LookAt=: 3 : 0
> 'eye center up'=. _3]\,>y
> F=. center - eye
> f=. (% +/&.:*:)F
> UPP=. (% +/&.:*:)up
> s=. f ((1&|.@:[ * _1&|.@:]) - _1&|.@:[ * 1&|.@:]) UPP
> u=. s ((1&|.@:[ * _1&|.@:]) - _1&|.@:[ * 1&|.@:]) f
> M=. |:_4]\ s, 0, u, 0, (-f), 0 0 0 0 1
> M (+/ . *)~ gl_Translate -eye
> )
> 
> In this revised version, eye and center are
> points specified in world coordinates, and up
> is a vector in world coordinates that will
> be aligned to the positive y-axis in the viewing
> coordinate system.  My apologies if this is not
> correct - I'm still trying to make sense of the
> OpenGL ES viewing pipeline and J's binding to it.
> The existing shader demo still works with this
> version, and several small test scripts I've
> written generate appropriate images as well.
> 
>     Thanks,
> 
>     Jim Uhl
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to