Changeset 1241


Ignore:
Timestamp:
08/21/06 02:54:45 (18 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp

    r1239 r1241  
    3636typedef GlRendererWidget *(*importFunction)(Preprocessor *); 
    3737 
     38 
    3839int LoadMyDll() 
    3940{ 
    40   importFunction LoadRenderWidget; 
    41  
    42   // Load DLL file 
    43   HINSTANCE hinstLib = LoadLibrary("QtGlRenderer.dll"); 
    44    
    45   if (hinstLib == NULL)  
    46         { 
    47           cout << "ERROR: unable to load DLL\n"; 
    48           return 1; 
    49         } 
    50    
    51   // Get function pointer 
    52   LoadRenderWidget = (importFunction)GetProcAddress(hinstLib, "LoadRenderWidget"); 
    53    
    54   if (LoadRenderWidget == NULL)  
    55         { 
    56           cout << "ERROR: unable to find DLL function\n"; 
    57           return 1; 
    58         } 
    59    
    60   // load the render window 
    61   rendererWidget = LoadRenderWidget(preprocessor); 
    62    
    63   // Unload DLL file 
    64   //FreeLibrary(hinstLib); 
    65    
    66   return 0; 
    67 } 
    68  
     41        importFunction LoadRenderWidget; 
     42 
     43        // Load DLL file 
     44        HINSTANCE hinstLib = LoadLibrary("../QtGlRenderer/Release/QtGlRenderer.dll"); 
     45 
     46        if (hinstLib == NULL)  
     47        { 
     48                cout << "ERROR: unable to load DLL\n"; 
     49                return 1; 
     50        } 
     51   
     52        // Get function pointer 
     53        LoadRenderWidget = (importFunction)GetProcAddress(hinstLib, "LoadRenderWidget"); 
     54   
     55        if (LoadRenderWidget == NULL)  
     56        { 
     57                cout << "ERROR: unable to find DLL function\n"; 
     58                return 1; 
     59        } 
     60 
     61        cout << "loading widget ... "; 
     62        // load the render window 
     63        rendererWidget = LoadRenderWidget(preprocessor); 
     64        cout << "finished" << endl; 
     65        // Unload DLL file 
     66        //FreeLibrary(hinstLib); 
     67   
     68        return 0; 
     69} 
    6970 
    7071 
     
    8384{ 
    8485        if (!rendererWidget) 
     86        { 
    8587                LoadMyDll(); 
    86  
     88        } 
     89         
    8790        //rendererWidget->Show(); 
    8891} 
     
    217220        if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger) 
    218221        { 
     222                cout << "using gl widget" << endl; 
    219223                // create and run the preprocessor application in a parallel thread 
    220224                pt.InitThread(); 
Note: See TracChangeset for help on using the changeset viewer.