[Mesa-dev] [PATCH] vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays
Brian Paul
brian.e.paul at gmail.com
Wed Dec 21 06:09:13 PST 2011
On Wed, Dec 21, 2011 at 4:16 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> Looks good to me Brian.
>
> I assume it is already impossible for the arrays to change in such subtle manner within a single draw method, without provoking _NEW_ARRAY to be set.
I believe so.
When the VBO module builds arrays out of glBegin/glVertex/etc calls it
will set _NEW_STATE if the attributes change from one primitive to the
next when it calls _mesa_set_varying_vp_inputs(). Also, I hacked up
a test program to verify that if one primitive used glTexCoord2f() and
the next primitive uses glTexCoord4f() that _NEW_ARRAY is set. That's
always worked.
Otherwise, if the user is drawing arrays, any call to glFooPointer()
will set _NEW_STATE.
It was just the transition between glBegin/End and glDrawArrays (with
no glVertexPointer calls in between) that hit this bug.
-Brian
More information about the mesa-dev
mailing list