Changeset 278

Show
Ignore:
Timestamp:
11/26/07 21:22:09 (10 months ago)
Author:
aldacron
Message:

[DerelictFT]
* now attempts to load libfreetype.so.6 first on Linux
[DerelictGL]
* now explicitly links to usergdi32.lib on Windows with Tango via a pragma

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictFT/derelict/freetype/ftfuncs.d

    r267 r278  
    296296    DerelictFT.setup( 
    297297        "freetype.dll", 
    298         "libfreetype.so", 
     298        "libfreetype.so.6,libfreetype.so", 
    299299        "", 
    300300        &loadFT, 
  • trunk/DerelictGL/derelict/opengl/gl.d

    r269 r278  
    5050    import derelict.util.wrapper; 
    5151 
    52     version(Windows)  
     52    version(Windows) 
    5353    { 
    5454        import derelict.opengl.wgl; 
     
    6262    else version(darwin) 
    6363    { 
    64        void loadPlatformGL(SharedLib lib) {} 
     64        void loadPlatformGL(SharedLib lib) {} 
    6565    } 
    6666 
     
    105105        version(DigitalMars) 
    106106        { 
    107             pragma(lib, "gdi32.lib"); 
     107            version(Tango) 
     108            { 
     109                pragma(lib, "usergdi32.lib"); 
     110            } 
     111            else 
     112            { 
     113                pragma(lib, "gdi32.lib"); 
     114            } 
    108115        } 
    109116 
     
    157164        GLLoader.load(libNameString); 
    158165    } 
    159      
     166 
    160167    static void load(char[][] libs) 
    161168    { 
    162         GLLoader.load(libs);     
     169        GLLoader.load(libs); 
    163170    } 
    164171 
     
    172179        GLLoader.unload(); 
    173180    } 
    174      
     181 
    175182    static bool loaded() 
    176183    { 
    177        return GLLoader.loaded; 
    178     } 
    179      
     184        return GLLoader.loaded; 
     185    } 
     186 
    180187    static char[] libName() 
    181188    { 
    182        return GLLoader.libName; 
     189        return GLLoader.libName; 
    183190    } 
    184191 
     
    196203        } 
    197204        else throw new DerelictException("DerelictGL.hasValidContext is unimplemented for this platform"); 
    198          
     205 
    199206        return true; 
    200207    } 
    201      
     208 
    202209    static DerelictGLContext getCurrentContext() 
    203210    { 
    204        version(Windows) return wglGetCurrentContext(); 
    205        else version(UsingGLX) return glXGetCurrentContext(); 
    206        else throw new DerelictException("DerelictGL.getCurrentContext is Unimplemented for this platform"); 
     211        version(Windows) return wglGetCurrentContext(); 
     212        else version(UsingGLX) return glXGetCurrentContext(); 
     213        else throw new DerelictException("DerelictGL.getCurrentContext is Unimplemented for this platform"); 
    207214    } 
    208215 
     
    225232        if(GLVersion.VersionNone == maxVersionAvail) 
    226233            setVersion(); 
    227           
     234 
    228235        if(GLVersion.Version11 == maxVersionAvail) 
    229236        { 
    230            loadedVersion = GLVersion.Version11; 
    231            return; 
    232        
     237            loadedVersion = GLVersion.Version11; 
     238            return; 
     239       
    233240 
    234241        try 
     
    253260            if(minVersion >= GLVersion.Version20) 
    254261                loadVersion(&loadGL20, GLVersion.Version20); 
    255                  
     262 
    256263            // version 2.1 
    257264            if(minVersion >= GLVersion.Version21) 
    258                loadVersion(&loadGL21, GLVersion.Version21); 
     265                loadVersion(&loadGL21, GLVersion.Version21); 
    259266        } 
    260267        catch(SharedLibProcLoadException slple)