Horde3D http://horde3d.org/forums/ |
|
Texture coord set 2 support in colladaconv http://horde3d.org/forums/viewtopic.php?f=3&t=507 |
Page 1 of 1 |
Author: | attila [ 18.09.2008, 19:44 ] |
Post subject: | Texture coord set 2 support in colladaconv |
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? |
Author: | attila [ 18.09.2008, 20:33 ] |
Post subject: | Re: Texture coord set 2 support in colladaconv |
I've tried it and it fixed the problem. |
Author: | AcidFaucet [ 19.09.2008, 03:18 ] |
Post subject: | Re: Texture coord set 2 support in colladaconv |
It's a boo-boo, probably a quick copy&paste that missed the two character change required. I fixed this, courtesy of attila, and pushed it into the Community SVN. |
Author: | Volker [ 19.09.2008, 07:00 ] |
Post subject: | Re: Texture coord set 2 support in colladaconv |
Thanks for reporting this,... I fixed it in the official SVN too. |
Author: | attila [ 20.09.2008, 13:08 ] |
Post subject: | Re: Texture coord set 2 support in colladaconv |
Thanks for the fix. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |