Changeset 995 for GTP/trunk/Lib/Geom/shared/GeoTool/src
- Timestamp:
- 05/30/06 14:07:05 (19 years ago)
- Location:
- GTP/trunk/Lib/Geom/shared/GeoTool/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshView.cpp
r994 r995 985 985 Index position; 986 986 Vector3 vector3; 987 Vector2 vector2; 987 988 float x,y,z; 988 989 float r,g,b; … … 993 994 current_strip = 0; 994 995 995 996 glEnable(GL_ALPHA_TEST); 997 // glEnable(GL_BLEND); 996 998 // DRAW THE TRUNK AS A LODSTRIP OBJECT 997 999 … … 999 1001 for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) 1000 1002 { 1001 1003 // bind current texture to use 1004 GLuint usetex = 0; 1005 if (use_texture_mapping) 1006 { 1007 if (current_texture_submesh[submesh]) 1008 usetex=current_texture_submesh[submesh]; 1009 else if (current_texture) 1010 usetex=current_texture; 1011 } 1012 glBindTexture(GL_TEXTURE_2D,usetex); 1013 1002 1014 color_index = 0; 1003 1015 … … 1039 1051 // Sets the vertex normal. 1040 1052 glNormal3f(x,y,z); 1053 1054 // set the texture coordinates if needed 1055 if (usetex) 1056 { 1057 vector2 = geosubmesh->mVertexBuffer->mTexCoords[position]; 1058 x = vector2[0]; 1059 y = vector2[1]; 1060 glTexCoord2f(x,y); 1061 } 1041 1062 1042 1063 // Gets the vertex coordinates. -
GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp
r994 r995 34 34 inline void GeoMeshViewUI::cb_menuFileLoadTexture_i(fltk::Item*, void*) 35 35 { 36 fltk::FileChooser *fcho = new fltk::FileChooser("","*.jpg",fltk::FileChooser::CREATE,"Open image file"); 36 static char pattern[] = "*.{jpg|tga|png|bmp}"; 37 38 fltk::FileChooser *fcho = new fltk::FileChooser("",pattern,fltk::FileChooser::CREATE,"Open image file"); 37 39 fcho->exec(); 38 40 char filename[256]=""; … … 53 55 inline void GeoMeshViewUI::cb_menuFileLoadTextureSubMesh_i(fltk::Item *item, void *) 54 56 { 57 static char pattern[] = "*.{jpg|tga|png|bmp}"; 58 55 59 const char * label = item->label(); 56 60 int isubmesh = label[strlen(label)-1]-48; 57 61 58 fltk::FileChooser *fcho = new fltk::FileChooser("", "*.jpg",fltk::FileChooser::CREATE,"Open image file");62 fltk::FileChooser *fcho = new fltk::FileChooser("",pattern,fltk::FileChooser::CREATE,"Open image file"); 59 63 fcho->exec(); 60 64 char filename[256]="";
Note: See TracChangeset
for help on using the changeset viewer.