[Piglit] [PATCH 05/13] util: Use a VAO and VBO for generic attributes in piglit_draw_rect_from_arrays

Eric Anholt eric at anholt.net
Wed Aug 28 09:33:51 PDT 2013


Ian Romanick <idr at freedesktop.org> writes:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> This will allow users of piglit_draw_rect_from_arrays to function in
> desktop OpenGL core profile.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Matt Turner <mattst88 at gmail.com>
> Cc: Paul Berry <stereotype441 at gmail.com>

> +		/* Assume that VBOs are supported in any implementation that
> +		 * uses shaders.
> +		 */
> +		glGetIntegerv(GL_ARRAY_BUFFER_BINDING,
> +			      (GLint *) &old_buf);
> +		glGenBuffers(1, &buf);
> +		glBindBuffer(GL_ARRAY_BUFFER, buf);
> +		glBufferData(GL_ARRAY_BUFFER,
> +			     (sizeof(GLfloat) * 4 * 4)
> +			     + (sizeof(GLfloat) * 4 * 2),
> +			NULL,
> +			GL_STATIC_DRAW);

Funny indentation here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130828/62e0f854/attachment-0001.pgp>


More information about the Piglit mailing list