GLboolean
_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
- GLsizei count, GLsizei primcount)
+ GLsizei count, GLsizei numInstances)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
return GL_FALSE;
}
- if (primcount <= 0) {
- if (primcount < 0)
+ if (numInstances <= 0) {
+ if (numInstances < 0)
_mesa_error(ctx, GL_INVALID_VALUE,
- "glDrawArraysInstanced(primcount=%d)", primcount);
+ "glDrawArraysInstanced(numInstances=%d)", numInstances);
return GL_FALSE;
}
GLboolean
_mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices, GLsizei primcount)
+ const GLvoid *indices, GLsizei numInstances)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
return GL_FALSE;
}
- if (primcount <= 0) {
- if (primcount < 0)
+ if (numInstances <= 0) {
+ if (numInstances < 0)
_mesa_error(ctx, GL_INVALID_VALUE,
- "glDrawElementsInstanced(primcount=%d)", primcount);
+ "glDrawElementsInstanced(numInstances=%d)", numInstances);
return GL_FALSE;
}
*/
static void GLAPIENTRY
vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
- GLsizei primcount)
+ GLsizei numInstances)
{
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), start, count, primcount);
+ _mesa_lookup_enum_by_nr(mode), start, count, numInstances);
- if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, primcount))
+ if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances))
return;
FLUSH_CURRENT( ctx, 0 );
if (0)
check_draw_arrays_data(ctx, start, count);
- vbo_draw_arrays(ctx, mode, start, count, primcount);
+ vbo_draw_arrays(ctx, mode, start, count, numInstances);
if (0)
print_draw_arrays(ctx, mode, start, count);
GLuint start, GLuint end,
GLsizei count, GLenum type,
const GLvoid *indices,
- GLint basevertex, GLint primcount)
+ GLint basevertex, GLint numInstances)
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
prim[0].count = count;
prim[0].indexed = 1;
prim[0].basevertex = basevertex;
- prim[0].num_instances = primcount;
+ prim[0].num_instances = numInstances;
/* Need to give special consideration to rendering a range of
* indices starting somewhere above zero. Typically the
*/
static void GLAPIENTRY
vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices, GLsizei primcount)
+ const GLvoid *indices, GLsizei numInstances)
{
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstanced(%s, %d, %s, %p, %d)\n",
_mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices, primcount);
+ _mesa_lookup_enum_by_nr(type), indices, numInstances);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
- primcount))
+ numInstances))
return;
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
- count, type, indices, 0, primcount);
+ count, type, indices, 0, numInstances);
}