I added your tetrahedron object data into my test file for shader.ijs. The goal was to get a tetrahedron and a cube up there rotating. What I got was 2 badly formed tetrahedron rotating. I had thought from my reading that the shader should keep these entities distinct.
I don’t know why I can’t keep the shapes distinct. I have a feeling the vbo buffer is not working the way I think it is. Or the kernel needs a different vertex/color variable for each object. I tried changing the definition of the tetrahedron a bit. I suspect that it has to do with the shuffling of the vertex data to create the faces. But I can’t come up with the right vertex ordering to make the faces line up either Tom McGuire > On Feb 28, 2020, at 2:09 PM, Brian Schott <[email protected]> wrote: > > Thomas, > > I agree with Bill that this is a great step forward in understanding how to > use opengl. > > My main interest is in doing a turtle graphics app which enables multiple > turtles to appear on the screen. In the previous version I had to keep > track of the position and heading of each turtle for each of the user's > moves. > I am mostly thinking of your use of glu_Lookat to translate the turtle and > rotate the turtle. I am toying with the idea of replacing the Eye in > glu_Lookat > with the current turtle's heading. But I really need to think about this > more and could use any ideas you have. > > Of course I am still struggling with painting the faces of the tetrahedrons > as solid colors. They are my tentative turtles. I am now wondering if my > problem is related to the use of four-element color vectors instead of > three element. I have not found any description of how to set those things > in the kernel as you seem to have done. And does this setting conflict with > the attribute setting that I changed from 3 to 4? > (B=) > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
