I have some problem with uv2. It seems like it is the same as uv1 when i'm using in the shader.
After a little investigation I found this.
Code:
case 6: // Texture Coord Set 1
fwrite( &i, sizeof( int ), 1, f );
streamElemSize = 2 * sizeof( float ); fwrite( &streamElemSize, sizeof( int ), 1, f );
for( unsigned int j = 0; j < count; ++j )
{
fwrite( &_vertices[j].texCoords[0].x, sizeof( float ), 1, f );
fwrite( &_vertices[j].texCoords[0].y, sizeof( float ), 1, f );
}
break;
case 7: // Texture Coord Set 2
fwrite( &i, sizeof( int ), 1, f );
streamElemSize = 2 * sizeof( float ); fwrite( &streamElemSize, sizeof( int ), 1, f );
for( unsigned int j = 0; j < count; ++j )
{
fwrite( &_vertices[j].texCoords[0].x, sizeof( float ), 1, f );
fwrite( &_vertices[j].texCoords[0].y, sizeof( float ), 1, f );
}
break;
I think the 'case 7:' should fwrite _vertices[j].texCoords[1]. Or am I missing something?