It's quite difficult to follow what you had changed and the final script.

Anyway mvp is recalculated inside paint event, not when F10 is pressed.


On Thu, Feb 13, 2020, 10:22 PM Brian Schott <schott.br...@gmail.com> wrote:

> In my attempt to learn opengl I have edited the file shader.ijs . I will
> show the following diff at the bottom of this email.
>
> diff  /Users/brian/j901/addons/demos/qtdemo/shader.ijs
> /Users/brian/j64-807-user/shaderb.ijs
>
> I have been assuming that the movement in the shader example is based on
> moving the eye instead of moving the cube that is being observed. So the
> first issue is whether my assumption is correct.
>
> The array vectors in the code are stored in the variable named mvp. My code
> attempts to translate the mvp by a few steps using gl_Translate when the
> function key number 10 (F10) is pressed. But with my current code nothing
> seems to happen when I press F10.
>
> Thanks in advance,
>
>
> server:~ brian$ diff  /Users/brian/j901/addons/demos/qtdemo/shader.ijs
> /Users/brian/j64-807-user/shaderb.ijs
> 7c7
> < STOP=: 1
> ---
> > STOP=: 0
> 16c16
> < if. -. checkrequire_qtdemo_ 'gles';'api/gles' do. return. end.
> ---
> > NB. if. -. checkrequire_qtdemo_ 'gles';'api/gles' do. return. end.
> 92c92
> < gl_paint''
> ---
> > gl_paint 0
> 116a117,118
> > if. y-:1 do. mvp=: gl_Translate 20 3 0
> > else.
> 120a123
> > end.
> 163c166,167
> < STOP=: -.STOP
> ---
> > NB. STOP=: -.STOP
> > gl_paint 1
> server:~ brian$
>
> --
> (B=)
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to