From: Peter Stirling <email@hidden>
Date: 22 March 2005 12:36:06 am GMT
To: Oscar Blasco <email@hidden>
Subject: Re: Vertex Arrays and VPs
I had the same problem, I submitted a bug for it a while back, it
appears that Apple ignores generic vertex attributes, when coupled
with vertex arrays (the values always seem to end up 0) (both in the
software and hardware (ATi 9800))
It works fine if you use the "normal" vertex attributes (color,
normal, tex coord, etc), or if you use immediate mode.
Bug number is 3743418, BTW and I've just checked and it's been
classified as a serious bug! Woo Hoo! (I had pretty much given up on
it being looked into)
On 21 Mar 2005, at 9:17 pm, Oscar Blasco wrote:
Hi all, I'm using the well know VP VertexAttribArray functions
without VERTEX_ARRAY_RANGE and I'm facing some strange behaviour. My
program every time I run it will or won't render at all randomly. I
mean for example that 1 every 4 times I run the program it renders
everything correctly, but the other runs wont. I'm sure its because
the arrays since you just need not to render the arrays and the
"normal" GL commands run correctly.
VertexPrograms::Enable(1); // Enable VP and load program 1
FragmentPrograms::Enable(0); // Same for FP
glEnableVertexAttribArrayARB(0);
glEnableVertexAttribArrayARB(1);
glEnableVertexAttribArrayARB(2);
glEnableVertexAttribArrayARB(8);
glEnableClientState(GL_ELEMENT_ARRAY_APPLE);
glVertexAttribPointerARB(0, 3, GL_FLOAT, GL_FALSE, 56,
&model->vertexArray[0].v);
glVertexAttribPointerARB(1, 4, GL_FLOAT, GL_FALSE, 56,
&model->vertexArray[0].f);
glVertexAttribPointerARB(2, 3, GL_FLOAT, GL_FALSE, 56,
&model->vertexArray[0].n);
glVertexAttribPointerARB(8, 2, GL_FLOAT, GL_FALSE, 56,
&model->vertexArray[0].t);
glElementPointerAPPLE(GL_UNSIGNED_INT, model->faces.Get());
glDrawElementArrayAPPLE(GL_TRIANGLES, 0, model->faces.Size());
glDisableClientState(GL_ELEMENT_ARRAY_APPLE);
glDisableVertexAttribArrayARB(0);
glDisableVertexAttribArrayARB(1);
glDisableVertexAttribArrayARB(2);
glDisableVertexAttribArrayARB(8);
FragmentPrograms::Disable();
VertexPrograms::Disable();
A similar piece of code was working well ages ago on win32. I just
can't isolate the problem, is something missing?? Something im not
taking account on MacOSX?
Thanks very much,
Oscar Blasco
email@hidden