Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 10:37

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 18.09.2008, 19:44 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
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?


Top
 Profile  
Reply with quote  
PostPosted: 18.09.2008, 20:33 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
I've tried it and it fixed the problem.


Top
 Profile  
Reply with quote  
PostPosted: 19.09.2008, 03:18 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
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.


Top
 Profile  
Reply with quote  
PostPosted: 19.09.2008, 07:00 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for reporting this,... I fixed it in the official SVN too.


Top
 Profile  
Reply with quote  
PostPosted: 20.09.2008, 13:08 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
Thanks for the fix.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group