}
-void
-_mesa_texture_buffer_range(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLenum internalFormat,
- struct gl_buffer_object *bufObj,
- GLintptr offset, GLsizeiptr size,
- const char *caller)
+/**
+ * Do work common to glTexBuffer, glTexBufferRange, glTextureBuffer
+ * and glTextureBufferRange, including some error checking.
+ */
+static void
+texture_buffer_range(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLenum internalFormat,
+ struct gl_buffer_object *bufObj,
+ GLintptr offset, GLsizeiptr size,
+ const char *caller)
{
mesa_format format;
if (!texObj)
return;
- _mesa_texture_buffer_range(ctx, texObj, internalFormat, bufObj, 0,
- buffer ? -1 : 0, "glTexBuffer");
+ texture_buffer_range(ctx, texObj, internalFormat, bufObj, 0,
+ buffer ? -1 : 0, "glTexBuffer");
}
if (!texObj)
return;
- _mesa_texture_buffer_range(ctx, texObj, internalFormat, bufObj,
- offset, size, "glTexBufferRange");
+ texture_buffer_range(ctx, texObj, internalFormat, bufObj,
+ offset, size, "glTexBufferRange");
}
void GLAPIENTRY
if (!check_texture_buffer_target(ctx, texObj->Target, "glTextureBuffer"))
return;
- _mesa_texture_buffer_range(ctx, texObj, internalFormat,
- bufObj, 0, buffer ? -1 : 0, "glTextureBuffer");
+ texture_buffer_range(ctx, texObj, internalFormat,
+ bufObj, 0, buffer ? -1 : 0, "glTextureBuffer");
}
void GLAPIENTRY
"glTextureBufferRange"))
return;
- _mesa_texture_buffer_range(ctx, texObj, internalFormat,
- bufObj, offset, size, "glTextureBufferRange");
+ texture_buffer_range(ctx, texObj, internalFormat,
+ bufObj, offset, size, "glTextureBufferRange");
}
GLboolean