Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I tried to incoporate your change into shader.ijs with f8/f9 to change value for gl_translate. The changes lines are marked by NB. < pressing f8/f9 can trigger repaint and the matrix display also updated, but I can't see the cube at all. Pressing F10 to start original code, the cube came back.

Re: [Jprogramming] How to flatten deeply nested arrays to a boxed vector?

2020-02-13 Thread Raul Miller
Use wrote: > > Dear all, > > I would like to know what is the best way to flatten a deeply nested array > to a single level of boxing. Essentially: > > (0 ;<(1;'a');<(2;<<'b')),:|.(3 ;<(4;'c');<(5;<<'d')) > > > would yield > > 0;1;2;3;4;5;'a';'b';'c';'d' > > > where order is unimportant. > > >

[Jprogramming] How to flatten deeply nested arrays to a boxed vector?

2020-02-13 Thread Raoul Schorer
Dear all, I would like to know what is the best way to flatten a deeply nested array to a single level of boxing. Essentially: (0 ;<(1;'a');<(2;<<'b')),:|.(3 ;<(4;'c');<(5;<<'d')) would yield 0;1;2;3;4;5;'a';'b';'c';'d' where order is unimportant. Thanks! Raoul ---

Re: [Jprogramming] OpenGL

2020-02-13 Thread Raul Miller
On Thu, Feb 13, 2020 at 11:14 AM Brian Schott wrote: > Yes, I think I understand the normally gl_paint is called from event > handler, > and I am calling gl_paint directly myself. Can you tell me where the code > for event handler is so that I can see if it is making another call that I > am not a

Re: [Jprogramming] OpenGL

2020-02-13 Thread Raul Miller
On Thu, Feb 13, 2020 at 10:53 AM Brian Schott wrote: > Bill (et al), > > Can you comment on my initial assumption that shader.ijs is not really > moving the cube but is moving the eye in relation to the cube, (and that a > more common way to move **multiple** objects is to move them, not the eye.)

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I think you can't call a_g_paint directly. Even you call, opengl code won't work because it must be executed inside paint event. you can trigger a repaint gl_paint and let the OS to call event handler. Why didn't you print out the y to see what is its value? On Fri, Feb 14, 2020, 12:14 AM Brian

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Yes, I think I understand the normally gl_paint is called from event handler, and I am calling gl_paint directly myself. Can you tell me where the code for event handler is so that I can see if it is making another call that I am not aware of? On Thu, Feb 13, 2020 at 11:02 AM bill lam wrote: > a

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
a_g_paint is called from event handler, not from your code. unless you had called this verb directly. the viewport is glu_lookat, but I forgot most of it already. Thu, 13 Feb 2020, Brian Schott написал(а): > Bill (et al), > > Can you comment on my initial assumption that shader.ijs is not really

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Bill (et al), Can you comment on my initial assumption that shader.ijs is not really moving the cube but is moving the eye in relation to the cube, (and that a more common way to move **multiple** objects is to move them, not the eye.) Bill, Replying to your 3 comments: 1)I have stopped the time

Re: [Jprogramming] "fcopy" command?

2020-02-13 Thread Devon McCormick
This works OK for me (in Windows): NB.* fcopy: copy x (fully-pathed name of file) to y. fcopy=: 4 : 'shell (''copy "'',x,''" "'',y,''"'') rplc ''/\''' NB.EG 'C:\Temp\foo.txt' fcopy 'E:\Perm\foo2.txt' I just noticed I had a commented-out version of "fcopy" using the win32api with 'CopyFileA', so pr

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
I think you should stop the timer so as not to interference your code. handler for paint event (and all events) receive no y argument. not sure what it looks like if mvp is translate only without projection from 3D to 2D. the screen is flat 2D. On Thu, Feb 13, 2020, 10:50 PM Brian Schott wrote:

Re: [Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
Bill, I have changed the original F10 to produce `paint 0` and the usual key to produce `paint 1`. I have critical new information though: If I press x and y several times to reposition the cube in the expected manner, and then I press F10. The cube seems to go back to its original position (appr

Re: [Jprogramming] OpenGL

2020-02-13 Thread bill lam
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 wrote: > In my attempt to learn opengl I have edited the file shader.ijs . I will > show the following d

[Jprogramming] OpenGL

2020-02-13 Thread Brian Schott
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 movin