[Piglit] [PATCH 04/13] util: Allow non-ES2 code to draw_rect with non-fixed-function arrays
eric at anholt.net
Wed Aug 28 09:36:07 PDT 2013
Ian Romanick <idr at freedesktop.org> writes:
> From: Ian Romanick <ian.d.romanick at intel.com>
> This will be used in future commits.
> v2: Use current program state to determine whether to use fixed-function
> attributes. There are two proposals in this patch. Hopefully reviewers
> will pick one. The first method checks whether the current program
> contains an attribute named "piglit_vertex". If it does, fixed-function
> attributes are not used. The other method check whether the current
> program contains an attribute whose name starts with "gl_". If it does,
> fixed-function attributes are used.
My peference order would be plan A), then plan C)
(glGetAttribLocation("gl_Vertex") != -1), then plan B). Bonus points if
you drop the ifdefs around the calls to glVertexPointer() and
glEnableVertexAttribArray() and friends -- piglit_dispatch means they're
always available to be linked against, even if the implementation
doesn't have them.
Other than a little style nit sent out separately, this is all:
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 835 bytes
Desc: not available
More information about the Piglit