Changeset 20400

Show
Ignore:
Timestamp:
06/30/07 07:13:33 (1 year ago)
Author:
patrick
Message:

MFT 20398: When looking up the Draw Manager DLL to get the icon for the

window, factor in that the DLL is versioned.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/branches/2.2/modules/vrjuggler/vrj/Draw/Direct3D/D3dWindow.cpp

    r20363 r20400  
    4141#include <vrj/Draw/Direct3D/D3dSimInterface.h> 
    4242 
     43// The following is used below in D3dWindow::registerWindowClass(). The key 
     44// parts are VJ_LIB_RT_OPT and VJ_VERSION_STR. 
     45#  if defined(VJ_DEBUG) 
     46#     if defined(_DEBUG) 
     47#        define VJ_LIB_RT_OPT "_d" 
     48#     else 
     49#        define VJ_LIB_RT_OPT "_g" 
     50#     endif 
     51#  else 
     52#     define VJ_LIB_RT_OPT "" 
     53#  endif 
     54 
     55#  define VJ_STRINGIZE(X) VJ_DO_STRINGIZE(X) 
     56#  define VJ_DO_STRINGIZE(X) #X 
     57#  define VJ_VERSION_STR VJ_STRINGIZE(__VJ_MAJOR__) "_" \ 
     58                         VJ_STRINGIZE(__VJ_MINOR__) "_" \ 
     59                         VJ_STRINGIZE(__VJ_PATCH__) 
     60 
    4361// This variable determines which matrix stack we put the viewing transformation 
    4462// If it is on the proj matrix, then lighting and env maps work but fog breaks. 
     
    478496   mWinClass.lpszClassName  = D3D_WINDOW_WIN32_CLASSNAME; 
    479497 
    480 #if defined(VJ_DEBUG) 
    481 #  if defined(_DEBUG) 
    482 #     define LIBNAME "vrj_d3d_d.dll" 
    483 #  else 
    484 #     define LIBNAME "vrj_d3d_g.dll" 
    485 #  endif 
    486 #else 
    487 #  define LIBNAME "vrj_d3d.dll" 
    488 #endif 
    489  
    490498   if (mWinClass.hIcon == NULL) 
    491499   { 
    492       HINSTANCE hDLLInstance = LoadLibrary( LIBNAME ); 
     500      HINSTANCE hDLLInstance = 
     501         LoadLibrary("vrj_d3d" VJ_LIB_RT_OPT "-" VJ_VERSION_STR ".dll"); 
    493502      if (hDLLInstance != NULL) 
    494503      { 
  • juggler/branches/2.2/modules/vrjuggler/vrj/Draw/OGL/GlWindowWin32.cpp

    r20363 r20400  
    4141#include <vrj/Draw/OGL/GlWindow.h> 
    4242#include <vrj/Draw/OGL/GlWindowWin32.h> 
     43 
     44// The following is used below in GlWindowWin32::registerWindowClass(). The 
     45// key parts are VJ_LIB_RT_OPT and VJ_VERSION_STR. 
     46#  if defined(VJ_DEBUG) 
     47#     if defined(_DEBUG) 
     48#        define VJ_LIB_RT_OPT "_d" 
     49#     else 
     50#        define VJ_LIB_RT_OPT "_g" 
     51#     endif 
     52#  else 
     53#     define VJ_LIB_RT_OPT "" 
     54#  endif 
     55 
     56#  define VJ_STRINGIZE(X) VJ_DO_STRINGIZE(X) 
     57#  define VJ_DO_STRINGIZE(X) #X 
     58#  define VJ_VERSION_STR VJ_STRINGIZE(__VJ_MAJOR__) "_" \ 
     59                         VJ_STRINGIZE(__VJ_MINOR__) "_" \ 
     60                         VJ_STRINGIZE(__VJ_PATCH__) 
     61 
    4362 
    4463static const char* GL_WINDOW_WIN32_CLASSNAME("vrj::GlWindowWin32"); 
     
    722741   mWinClass.lpszClassName  = GL_WINDOW_WIN32_CLASSNAME; 
    723742 
    724 #if defined(VJ_DEBUG) 
    725 #  if defined(_DEBUG) 
    726 #     define LIBNAME "vrj_ogl_d.dll" 
    727 #  else 
    728 #     define LIBNAME "vrj_ogl_g.dll" 
    729 #  endif 
    730 #else 
    731 #  define LIBNAME "vrj_ogl.dll" 
    732 #endif 
    733  
    734743   if (mWinClass.hIcon == NULL) 
    735744   { 
    736       HINSTANCE hDLLInstance = LoadLibrary( LIBNAME ); 
     745      HINSTANCE hDLLInstance = 
     746         LoadLibrary("vrj_ogl" VJ_LIB_RT_OPT "-" VJ_VERSION_STR ".dll"); 
    737747      if (hDLLInstance != NULL) 
    738748      {