Changeset 9

Show
Ignore:
Timestamp:
11/06/07 12:50:23
Author:
robert
Message:

From Colin Dunlop, port to Windows

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Cluster.h

    r1 r9  
    2121#if !defined(WIN32) || defined(__CYGWIN__) 
    2222    #include <netinet/in.h> 
     23#else 
     24    #include "winsock.h" 
    2325#endif 
    2426 
  • trunk/src/SlideShowConstructor.cpp

    r1 r9  
    3737 
    3838#include <sstream> 
     39#include <algorithm> 
    3940 
    4041#include "AnimationMaterial.h" 
     
    633634    if (imageStream) 
    634635    { 
    635        imageStream->pause(); 
     636        imageStream->pause(); 
    636637     
    637638        osg::notify(osg::INFO)<<"Reading video "<<imageStream->getFileName()<<std::endl;  
  • trunk/src/present3D.cpp

    r8 r9  
    1414#include <osg/CameraNode> 
    1515#include <osg/Texture2D> 
     16#include <osg/Notify> 
    1617 
    1718 
     
    154155 
    155156 
    156 enum ApplicationType 
     157enum P3DApplicationType 
    157158{ 
    158159    VIEWER, 
     
    188189    arguments.getApplicationUsage()->addCommandLineOption("--html <filename>","Print out slides to a series of html & image files."); 
    189190    arguments.getApplicationUsage()->addCommandLineOption("--loop","Switch on looping of presentation."); 
    190  
     191    arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit."); 
     192 
     193    // if user requests devices video capability. 
     194    if (arguments.read("-devices") || arguments.read("--devices")) 
     195    { 
     196        // Force load QuickTime plugin, probe video capability, exit 
     197        osgDB::readImageFile("devices.live"); 
     198        return 1; 
     199    } 
    191200 
    192201#ifdef USE_SDL 
     
    357366    } 
    358367 
    359     ApplicationType applicationType = VIEWER; 
     368    P3DApplicationType P3DApplicationType = VIEWER; 
    360369 
    361370    str = getenv("PRESENT3D_TYPE"); 
    362371    if (str) 
    363372    { 
    364         if (strcmp(str,"viewer")==0) applicationType = VIEWER; 
    365         else if (strcmp(str,"master")==0) applicationType = MASTER; 
    366         else if (strcmp(str,"slave")==0) applicationType = SLAVE; 
     373        if (strcmp(str,"viewer")==0) P3DApplicationType = VIEWER; 
     374        else if (strcmp(str,"master")==0) P3DApplicationType = MASTER; 
     375        else if (strcmp(str,"slave")==0) P3DApplicationType = SLAVE; 
    367376    } 
    368377         
    369     while (arguments.read("--viewer")) { applicationType = VIEWER; } 
    370     while (arguments.read("--master")) { applicationType = MASTER; } 
    371     while (arguments.read("--slave")) { applicationType = SLAVE; } 
     378    while (arguments.read("--viewer")) { P3DApplicationType = VIEWER; } 
     379    while (arguments.read("--master")) { P3DApplicationType = MASTER; } 
     380    while (arguments.read("--slave")) { P3DApplicationType = SLAVE; } 
    372381     
    373382    while (arguments.read("--version")) 
    374383    { 
    375384        std::string appTypeName = "invalid"; 
    376         switch(applicationType) 
     385        switch(P3DApplicationType) 
    377386        { 
    378387            case(VIEWER): appTypeName = "viewer"; break; 
     
    568577#endif 
    569578 
    570             if (applicationType==MASTER) 
     579            if (P3DApplicationType==MASTER) 
    571580            { 
    572581                // take camera zero as the guide. 
     
    589598                bc.sync(); 
    590599            } 
    591             else if (applicationType==SLAVE) 
     600            else if (P3DApplicationType==SLAVE) 
    592601            { 
    593602                rc.setBuffer(scratchPad._startPtr, scratchPad._numBytes); 
     
    616625            viewer.updateTraversal(); 
    617626 
    618             if (applicationType==SLAVE) 
     627            if (P3DApplicationType==SLAVE) 
    619628            { 
    620629                osg::Matrix modelview;