Ignore:
Timestamp:
05/30/06 14:07:05 (18 years ago)
Author:
gumbau
Message:
 
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  
    985985        Index                                   position; 
    986986        Vector3                         vector3; 
     987        Vector2                         vector2; 
    987988        float                                   x,y,z; 
    988989        float                                   r,g,b; 
     
    993994        current_strip   =       0; 
    994995 
    995  
     996        glEnable(GL_ALPHA_TEST); 
     997//      glEnable(GL_BLEND); 
    996998        // DRAW THE TRUNK AS A LODSTRIP OBJECT 
    997999 
     
    9991001        for (int submesh = 0; submesh < geoMesh->mSubMeshCount; submesh++) 
    10001002        { 
    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 
    10021014                color_index     =       0; 
    10031015 
     
    10391051                                //      Sets the vertex normal. 
    10401052                                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                                } 
    10411062 
    10421063                                //      Gets the vertex coordinates. 
  • GTP/trunk/Lib/Geom/shared/GeoTool/src/GeoMeshViewUI.cpp

    r994 r995  
    3434inline void GeoMeshViewUI::cb_menuFileLoadTexture_i(fltk::Item*, void*) 
    3535{ 
    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"); 
    3739        fcho->exec(); 
    3840        char filename[256]="";   
     
    5355inline void GeoMeshViewUI::cb_menuFileLoadTextureSubMesh_i(fltk::Item *item, void *) 
    5456{ 
     57        static char pattern[] = "*.{jpg|tga|png|bmp}"; 
     58 
    5559        const char * label = item->label(); 
    5660        int isubmesh = label[strlen(label)-1]-48; 
    5761 
    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"); 
    5963        fcho->exec(); 
    6064        char filename[256]=""; 
Note: See TracChangeset for help on using the changeset viewer.