Raul, My problems with color may be different from the ones you mention. In the pair of lines below in the shader.ijs program, the first is the original line and the second is the line that gives some, but CRAZY, uniform face color.
NB. glVertexAttribPointer colorAttr; 3; GL_FLOAT; 0; 0; 0 glVertexAttribPointer colorAttr; 4; GL_FLOAT; 0; 0; 0 But I did not notice the "kernel"s treatment of color until Thomas pointed it out, and I don't know how to process the 2: kernel and glVertexAttribPointer. Both vsrc1 and vsrc2 (at the bottom of shader.ijs) refer to `color` and `v_color`. Both refer to the following, for example. v_color = vec4(color,1.0); I don't understand how that relates and effects the colorAttr in glVertexAttribPointer. All I know is my "turtle" is not looking like a tetrahedron. On Fri, Feb 28, 2020 at 2:17 PM Raul Miller <[email protected]> wrote: > On Fri, Feb 28, 2020 at 2:09 PM Brian Schott <[email protected]> > wrote: > > 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? > > Just as a reminder: four element "color" in opengl is typically rgba: > red, green, blue, alpha. > > The alpha color channel ranges from 0 (transparent) to 1 (opaque) in > typical application (but shaders are free to re-interpret color > information arbitrarily -- the definitive color is what's emitted by > the pixel shader). > > https://www.khronos.org/opengl/wiki/Image_Format > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
