Implement support for GL_UNSIGNED_INT indices
This commit is contained in:
parent
8cc9e84cca
commit
31e666c77a
|
@ -121,10 +121,13 @@ static void _parseFloats(GLfloat* out, const GLubyte* in, GLint size, GLenum typ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _parseIndex(GLshort* out, const GLubyte* in, GLenum type) {
|
static void _parseIndex(GLuint* out, const GLubyte* in, GLenum type) {
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case GL_UNSIGNED_BYTE:
|
case GL_UNSIGNED_BYTE:
|
||||||
*out = (GLshort) *in;
|
*out = (GLuint) *in;
|
||||||
|
break;
|
||||||
|
case GL_UNSIGNED_INT:
|
||||||
|
*out = *((GLuint*) in);
|
||||||
break;
|
break;
|
||||||
case GL_UNSIGNED_SHORT:
|
case GL_UNSIGNED_SHORT:
|
||||||
default:
|
default:
|
||||||
|
@ -203,7 +206,7 @@ static void generate(AlignedVector* output, const GLenum mode, const GLsizei fir
|
||||||
for(j = first; j < max; ++i, ++j, ++vertex) {
|
for(j = first; j < max; ++i, ++j, ++vertex) {
|
||||||
vertex->flags = PVR_CMD_VERTEX;
|
vertex->flags = PVR_CMD_VERTEX;
|
||||||
|
|
||||||
GLshort idx = j;
|
GLuint idx = j;
|
||||||
if(indices) {
|
if(indices) {
|
||||||
_parseIndex(&idx, &indices[byte_size(type) * j], type);
|
_parseIndex(&idx, &indices[byte_size(type) * j], type);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user