Changeset 1083 for GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
- Timestamp:
- 07/05/06 20:18:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
r1078 r1083 892 892 current_strip = 0; 893 893 894 int begin_index = 0;895 896 894 // For each submesh. 897 895 for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) … … 968 966 }*/ 969 967 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); 972 970 973 971 glBegin(GL_TRIANGLE_STRIP); 974 972 //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 ++) 976 974 { 977 975 position = lodStripsLib->dataRetrievalInterface->GetIndex(index); … … 1007 1005 } 1008 1006 glEnd(); 1009 begin_index += indices_to_render;1010 1007 1011 1008 } … … 1032 1029 1033 1030 // DRAW THE TRUNK AS A LODSTRIP OBJECT 1034 1035 int begin_index = 0;1036 1037 1031 // For each submesh. 1038 1032 for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) … … 1112 1106 }*/ 1113 1107 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); 1115 1111 1116 1112 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 ++) 1118 1114 { 1119 1115 position = lodTreeLib->CurrentLOD_Trunk_Indices()->GetIndex(index); … … 1149 1145 } 1150 1146 glEnd(); 1151 begin_index += indices_to_render;1152 1153 1147 } 1154 1148
Note: See TracChangeset
for help on using the changeset viewer.