typedef void (GLAPIENTRY *array_func)( const void * );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
int offset;
} AEarray;
typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
typedef struct {
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
const struct gl_vertex_buffer_binding *binding;
attrib_func func;
GLuint index;
}
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_TEX(i)];
if (attribArray->Enabled) {
/* NOTE: we use generic glVertexAttribNV functions here.
/* generic vertex attribute arrays */
for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */
- struct gl_vertex_attrib_array *attribArray =
+ struct gl_array_attributes *attribArray =
&vao->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
if (attribArray->Enabled) {
GLint intOrNorm;
struct gl_vertex_array_object *vao,
GLuint index, GLint size, GLint type)
{
- struct gl_vertex_attrib_array *array = &vao->VertexAttrib[index];
+ struct gl_array_attributes *array = &vao->VertexAttrib[index];
struct gl_vertex_buffer_binding *binding = &vao->VertexBinding[index];
array->Size = size;
const int attrib = u_bit_scan64(&arrays);
struct gl_client_array *client_array;
- struct gl_vertex_attrib_array *attrib_array;
+ struct gl_array_attributes *attrib_array;
struct gl_vertex_buffer_binding *buffer_binding;
attrib_array = &vao->VertexAttrib[attrib];
* attrib arrays at once
*/
const int i = ffsll(mask) - 1;
- const struct gl_vertex_attrib_array *attrib_array =
+ const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[i];
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->VertexBinding[attrib_array->BufferBindingIndex];
while (mask) {
const int i = ffsll(mask) - 1;
- const struct gl_vertex_attrib_array *attrib_array =
+ const struct gl_array_attributes *attrib_array =
&vao->VertexAttrib[i];
const struct gl_vertex_buffer_binding *buffer_binding =
&vao->VertexBinding[attrib_array->BufferBindingIndex];
find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v)
{
struct gl_buffer_object **buffer_obj;
- struct gl_vertex_attrib_array *array;
+ struct gl_array_attributes *array;
GLuint unit, *p;
switch (d->pname) {
[ "COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
[ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ],
[ "COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_vertex_attrib_array, Enabled), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Size), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_vertex_attrib_array, Type), NO_EXTRA" ],
- [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_vertex_attrib_array, Stride), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_array_attributes, Enabled), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Size), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_TYPE", "LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_array_attributes, Type), NO_EXTRA" ],
+ [ "TEXTURE_COORD_ARRAY_STRIDE", "LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_attributes, Stride), NO_EXTRA" ],
# GL_ARB_multitexture
[ "MAX_TEXTURE_UNITS", "CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA" ],
/**
- * Vertex attribute array as seen by the client.
+ * Attributes to describe a vertex array.
*
* Contains the size, type, format and normalization flag,
* along with the index of a vertex buffer binding point.
* and VERTEX_BINDING_STRIDE to the same value, while
* glBindVertexBuffer() will only set VERTEX_BINDING_STRIDE.
*/
-struct gl_vertex_attrib_array
+struct gl_array_attributes
{
GLint Size; /**< Components per element (1,2,3,4) */
GLenum Type; /**< Datatype: GL_FLOAT, GL_INT, etc */
struct gl_client_array _VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex attribute arrays */
- struct gl_vertex_attrib_array VertexAttrib[VERT_ATTRIB_MAX];
+ struct gl_array_attributes VertexAttrib[VERT_ATTRIB_MAX];
/** Vertex buffer bindings */
struct gl_vertex_buffer_binding VertexBinding[VERT_ATTRIB_MAX];
GLuint attribIndex,
GLuint bindingIndex)
{
- struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attribIndex];
+ struct gl_array_attributes *array = &vao->VertexAttrib[attribIndex];
if (!_mesa_is_bufferobj(vao->VertexBinding[bindingIndex].BufferObj))
vao->VertexAttribBufferMask &= ~VERT_BIT(attribIndex);
GLboolean integer, GLboolean doubles,
GLuint relativeOffset, bool flush_vertices)
{
- struct gl_vertex_attrib_array *const array = &vao->VertexAttrib[attrib];
+ struct gl_array_attributes *const array = &vao->VertexAttrib[attrib];
GLint elementSize;
assert(size <= 4);
GLboolean normalized, GLboolean integer, GLboolean doubles,
const GLvoid *ptr)
{
- struct gl_vertex_attrib_array *array;
+ struct gl_array_attributes *array;
GLsizei effectiveStride;
/* Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says:
GLuint index, GLenum pname,
const char *caller)
{
- const struct gl_vertex_attrib_array *array;
+ const struct gl_array_attributes *array;
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index);
void
_mesa_copy_vertex_attrib_array(struct gl_context *ctx,
- struct gl_vertex_attrib_array *dst,
- const struct gl_vertex_attrib_array *src)
+ struct gl_array_attributes *dst,
+ const struct gl_array_attributes *src)
{
dst->Size = src->Size;
dst->Type = src->Type;
unsigned i;
for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[i];
if (!array->Enabled)
continue;
* a vertex buffer.
*/
static inline const GLubyte *
-_mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array,
+_mesa_vertex_attrib_address(const struct gl_array_attributes *array,
const struct gl_vertex_buffer_binding *binding)
{
if (_mesa_is_bufferobj(binding->BufferObj))
static inline void
_mesa_update_client_array(struct gl_context *ctx,
struct gl_client_array *dst,
- const struct gl_vertex_attrib_array *src,
+ const struct gl_array_attributes *src,
const struct gl_vertex_buffer_binding *binding)
{
dst->Size = src->Size;
extern void
_mesa_copy_vertex_attrib_array(struct gl_context *ctx,
- struct gl_vertex_attrib_array *dst,
- const struct gl_vertex_attrib_array *src);
+ struct gl_array_attributes *dst,
+ const struct gl_array_attributes *src);
extern void
_mesa_copy_vertex_buffer_binding(struct gl_context *ctx,
check_array_data(struct gl_context *ctx, struct gl_vertex_array_object *vao,
GLuint attrib, GLuint j)
{
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
if (array->Enabled) {
const struct gl_vertex_buffer_binding *binding =
&vao->VertexBinding[array->BufferBindingIndex];
unmap_array_buffer(struct gl_context *ctx, struct gl_vertex_array_object *vao,
GLuint attrib)
{
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[attrib];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[attrib];
if (array->Enabled) {
const struct gl_vertex_buffer_binding *binding =
&vao->VertexBinding[array->BufferBindingIndex];
unsigned i;
for (i = 0; i < VERT_ATTRIB_MAX; ++i) {
- const struct gl_vertex_attrib_array *array = &vao->VertexAttrib[i];
+ const struct gl_array_attributes *array = &vao->VertexAttrib[i];
if (!array->Enabled)
continue;
{
struct vbo_context *vbo = vbo_context(ctx);
struct vbo_exec_context *exec = &vbo->exec;
- const struct gl_vertex_attrib_array *array = ctx->Array.VAO->VertexAttrib;
+ const struct gl_array_attributes *array = ctx->Array.VAO->VertexAttrib;
struct gl_client_array *vertexAttrib = ctx->Array.VAO->_VertexAttrib;
const struct gl_client_array **inputs = &exec->array.inputs[0];
GLbitfield64 const_inputs = 0x0;