All, I think I have found 2 problems and fixed them. I hope this continues to work.
0) I made the following change in `a_g_paint`: adding the second line of the 4 lines. glBindBuffer GL_ARRAY_BUFFER; {.vbo glBufferData GL_ARRAY_BUFFER; (#vertexData); (symdat <'vertexData'); GL_STATIC_DRAW glEnableVertexAttribArray vertexAttr glVertexAttribPointer vertexAttr; 3; GL_FLOAT; 0; 0; 0 1) On the 3rd line below I add }:"1 just to the right of vd=. . right=: 3 : 0 wh=. gl_qwh'' vd=. }:"1 (gl_Rotate y, 0 0 1) mp~ 0,.~_3]\_1 fc vertexData p=. symdat <'vertexData' d=. 1&fc ,vd d memw p,0,(#d),2 gl_sel HD gl_paint'' ) On Wed, Mar 4, 2020 at 3:20 PM Brian Schott <schott.br...@gmail.com> wrote: > > Bill, > > Following your great recommendation I created the verb `right` below. > > right=: 3 : 0 > wh=. gl_qwh'' > vd=. (gl_Rotate y, 0 0 1) mp~ 0,.~_3]\_1 fc vertexData > p=. symdat <'vertexData' > d=. 1&fc ,vd > d memw p,0,(#d),2 > gl_sel HD > gl_paint'' > ) > > After running the script I can see that `vertexData` has been changed as I > wish after `right 90`, as shown below from the difference between > vertexData before and after issuing the `right 90`. But the graphics window > has not changed at all. What's the problem? The standard `a_g_paint` verb > may need to be altered to trigger a new paint, but I can't think how. > > 6 {. _1 fc vertexData > 0.3 _0.3 _0.133333 0 _0.1 0.0666667 > right 90 > 0 > 6 {. _1 fc vertexData > _0.3 _0.3 _0.133333 0 _0.1 _6.12323e_18 > > I added an `smoutput vbo` in a_g_paint and my session looked like the > following where 3 4 is vbo here. > 3 4 > 3 4 > right 90 > 0 > 3 4 > > I similarly added `smoutput` almost everywhere in a_g_paint producing > identical before and after results. > > > On Tue, Mar 3, 2020 at 10:44 PM bill lam <bbill....@gmail.com> wrote: > >> symdat <'vertexData' is a pointer to the data (not header). >> If you want to update without re-assigning the name, you >> could do something like >> >> p=. symdat <'vertexData' >> d=. 1&fc (new vertex data) >> d memw p,0,(#d),2 >> >> but beware of any side effects >> >> -- > (B=) > -- (B=) <-----my sig Brian Schott ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm