gl.mesh color array (no effect)
Hi, In the following patch I expect to see a line that is changing color
with a fading alpha channel. Instead I get a solid colored line no matter
what I try. Am I missing something obvious?
I'm using windows, jit1.6.3b1, max 4.6.2
cheers, -thijs
> Hi, In the following patch I expect to see a line that is changing color
> with a fading alpha channel.
> Instead I get a solid colored line no matter what I try. Am I missing
> something obvious?
Hello thijs,
i can confirm the same behaviour here, when lighting_enable is 1.
you were also sending 4 plane matrix to vertex inlet, maybe that makes more
confusion for jit.gl.mesh.
try the patch below.
best,
n
On 11/1/06, nesa wrote:
>
>
> i can confirm the same behaviour here, when lighting_enable is 1.
> you were also sending 4 plane matrix to vertex inlet, maybe that makes
> more
> confusion for jit.gl.mesh.
Hi Nesa, I just got to the same conclusion. Sending the 4 plane matrix was
my mistake, and it makes sense that it confuses jit.gl.mesh. The second
cause, lighting_enable, is not supposed to be like that I right? So I guess
its a bug (?)
cheers, -thijs
it seems so, but who needs lighting anyway:)
jit.gl.mesh @lighting_enable 1 not showing the color array is normal
behavior. This array sets the glColorPointer function with the data
you pass in. The reason the other ob3ds' color attributes work with
@lighting_enable 1 is that behind the scenes glMaterial parameters are
being correspondingly set. The parameters kick in with
lighting_enable 1. Since there aren't any analagous functions for
vertex arrays in OpenGL, it stands to reason that the color array
doesn't work in this case. If you want this behavior, you need to
send your color array to a texture and set the texture coord array of
jit.gl.mesh.
wes
On 11/1/06, Wesley Smith wrote:
>
> jit.gl.mesh @lighting_enable 1 not showing the color array is normal
> behavior. This array sets the glColorPointer function with the data
> you pass in. The reason the other ob3ds' color attributes work with
> @lighting_enable 1 is that behind the scenes glMaterial parameters are
> being correspondingly set. The parameters kick in with
> lighting_enable 1. Since there aren't any analagous functions for
> vertex arrays in OpenGL, it stands to reason that the color array
> doesn't work in this case. If you want this behavior, you need to
> send your color array to a texture and set the texture coord array of
> jit.gl.mesh.
>
>
Hi Wes, thanks for explaining. Not sure I understand everything, but I'll
give it a shot.
cheer, -thijs
Hi Thijs,
Here's a patch to help you out. It shows how to get the same results
with @lighting_enable 1 for jit.gl.mesh as with @lighting_enable 0 and
a color array.
wes
On 11/2/06, Wesley Smith wrote:
>
> Hi Thijs,
> Here's a patch to help you out. It shows how to get the same results
> with @lighting_enable 1 for jit.gl.mesh as with @lighting_enable 0 and
> a color array.
Thank you very much! It appears to be very easy, but it would probably have
taken me quite a while to figure that out;-)
cheers, -thijs