And suddeny the texture index attrib(for batching) is now an integer! (Changing switch to an if block on nividia hardware seems like the real solution to pink textures... not the index datatype)

This commit is contained in:
Shyotl
2012-07-20 12:03:41 -05:00
parent 7b23aece00
commit b8b235df09
4 changed files with 16 additions and 18 deletions

View File

@@ -1249,7 +1249,7 @@ void LLVertexBuffer::setupVertexArray()
1, //TYPE_WEIGHT,
4, //TYPE_WEIGHT4,
4, //TYPE_CLOTHWEIGHT,
4, //TYPE_TEXTURE_INDEX
1, //TYPE_TEXTURE_INDEX
};
U32 attrib_type[] =
@@ -1266,7 +1266,7 @@ void LLVertexBuffer::setupVertexArray()
GL_FLOAT, //TYPE_WEIGHT,
GL_FLOAT, //TYPE_WEIGHT4,
GL_FLOAT, //TYPE_CLOTHWEIGHT,
GL_UNSIGNED_BYTE, //TYPE_TEXTURE_INDEX
GL_UNSIGNED_INT, //TYPE_TEXTURE_INDEX
};
bool attrib_integer[] =
@@ -2313,7 +2313,7 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
#if !LL_DARWIN
S32 loc = TYPE_TEXTURE_INDEX;
void *ptr = (void*) (base + mOffsets[TYPE_VERTEX] + 12);
glVertexAttribIPointer(loc, 4, GL_UNSIGNED_BYTE, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
glVertexAttribIPointer(loc, 1, GL_UNSIGNED_INT, LLVertexBuffer::sTypeSize[TYPE_VERTEX], ptr);
#endif
}
if (data_mask & MAP_VERTEX)