mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Fix reading of GL_CURRENT_VERTEX_ATTRIB.
Turns out it returns a vec4. oops.
This commit is contained in:
parent
4e7af5c3e0
commit
6a44978a0f
1 changed files with 5 additions and 6 deletions
|
@ -348,15 +348,13 @@ GL_DumpAttribArrays (void)
|
|||
GLint type = -1;
|
||||
GLint norm = -1;
|
||||
GLint binding = -1;
|
||||
GLint current = -1;
|
||||
GLint current[4] = {-1, -1, -1, -1};
|
||||
void *pointer = 0;
|
||||
|
||||
qfglGetIntegerv (GL_MAX_VERTEX_ATTRIBS, &max);
|
||||
|
||||
for (ind = 0; ind < max; ind++) {
|
||||
qfglGetVertexAttribiv (ind, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &enabled);
|
||||
if (!enabled)
|
||||
continue;
|
||||
Sys_Printf ("attrib %d: %sabled\n", ind, enabled ? "en" : "dis");
|
||||
qfglGetVertexAttribiv (ind, GL_VERTEX_ATTRIB_ARRAY_SIZE, &size);
|
||||
qfglGetVertexAttribiv (ind, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &stride);
|
||||
|
@ -364,10 +362,11 @@ GL_DumpAttribArrays (void)
|
|||
qfglGetVertexAttribiv (ind, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &norm);
|
||||
qfglGetVertexAttribiv (ind, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
|
||||
&binding);
|
||||
qfglGetVertexAttribiv (ind, GL_CURRENT_VERTEX_ATTRIB, ¤t);
|
||||
qfglGetVertexAttribiv (ind, GL_CURRENT_VERTEX_ATTRIB, current);
|
||||
qfglGetVertexAttribPointerv (ind, GL_VERTEX_ATTRIB_ARRAY_POINTER,
|
||||
&pointer);
|
||||
Sys_Printf (" %d %d '%s' %d %d %d %p\n", size, stride,
|
||||
type_name (type), norm, binding, current, pointer);
|
||||
Sys_Printf (" %d %d '%s' %d %d (%d %d %d %d) %p\n", size, stride,
|
||||
type_name (type), norm, binding, QuatExpand (current),
|
||||
pointer);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue