Ignore:
Timestamp:
07/05/06 20:18:06 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp

    r1078 r1083  
    892892        current_strip = 0; 
    893893 
    894         int begin_index = 0; 
    895  
    896894        //      For each submesh. 
    897895        for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) 
     
    968966                }*/ 
    969967 
    970                 int indices_to_render = lodStripsLib->indices_x_submesh[submesh]; 
    971  
     968                int indices_to_render = lodStripsLib->GetValidIndexCount(submesh); 
     969                int offset = lodStripsLib->GetValidOffset(submesh); 
    972970 
    973971                glBegin(GL_TRIANGLE_STRIP); 
    974972                //for (int index = 0; index < lodStripsLib->dataRetrievalInterface->GetNumValidIndices(); index ++) 
    975                 for (int index = begin_index; index < indices_to_render+begin_index; index ++) 
     973                for (int index = offset; index < indices_to_render+offset; index ++) 
    976974                { 
    977975                        position = lodStripsLib->dataRetrievalInterface->GetIndex(index); 
     
    10071005                } 
    10081006                glEnd(); 
    1009                 begin_index += indices_to_render; 
    10101007 
    10111008        } 
     
    10321029 
    10331030        // DRAW THE TRUNK AS A LODSTRIP OBJECT 
    1034  
    1035         int begin_index = 0; 
    1036  
    10371031        //      For each submesh. 
    10381032        for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) 
     
    11121106                }*/ 
    11131107         
    1114                 int indices_to_render = lodTreeLib->trunk->indices_x_submesh[submesh]; 
     1108//              int indices_to_render = lodTreeLib->trunk->GetValidIndexCount(submesh); 
     1109                int indices_to_render = lodTreeLib->GetValidTrunkIndexCount(submesh); 
     1110                int begin_index = lodTreeLib->GetValidTrunkOffset(submesh); 
    11151111                         
    11161112                glBegin(GL_TRIANGLE_STRIP); 
    1117                 for (int index = begin_index; index < lodTreeLib->trunk->indices_x_submesh[submesh]; index ++) 
     1113                for (int index = begin_index; index < indices_to_render+begin_index; index ++) 
    11181114                { 
    11191115                        position = lodTreeLib->CurrentLOD_Trunk_Indices()->GetIndex(index); 
     
    11491145                } 
    11501146                glEnd(); 
    1151                 begin_index += indices_to_render; 
    1152  
    11531147        } 
    11541148 
Note: See TracChangeset for help on using the changeset viewer.