Changeset 20202

Show
Ignore:
Timestamp:
05/11/07 09:26:14 (2 years ago)
Author:
dshipton
Message:

Changes needed for OpenSG 2. OpenSG2 uses a RenderTraversalAction? instead
of a RenderAction?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vrjuggler/vrj/Draw/OpenSG/OpenSGApp.h

    r20080 r20202  
    3737#include <OpenSG/OSGConfig.h> 
    3838#include <OpenSG/OSGThread.h> 
    39 #include <OpenSG/OSGRenderAction.h> 
    4039#include <OpenSG/OSGMatrixCamera.h> 
    4140#include <OpenSG/OSGPassiveWindow.h> 
     
    4342#include <OpenSG/OSGPassiveBackground.h> 
    4443#include <OpenSG/OSGMatrixUtility.h> 
     44 
     45#if OSG_MAJOR_VERSION >= 2 
     46#include <OpenSG/OSGRenderTraversalAction.h> 
     47#else 
     48#include <OpenSG/OSGRenderAction.h> 
     49#endif 
    4550 
    4651/*----------------------------------------------------------------------------*/ 
     
    6772         ; 
    6873      } 
    69  
     74#if OSG_MAJOR_VERSION >= 2 
     75      OSG::RenderTraversalAction* mRenderAction;    /**< The render trav action for the scene */ 
     76#else 
    7077      OSG::RenderAction*         mRenderAction;    /**< The render action for the scene */ 
     78#endif 
     79 
    7180      OSG::PassiveWindowPtr      mWin;             /**< passive window to render with (the context) */ 
    7281      OSG::PassiveViewportPtr    mViewport;        /**< passive viewport to render with (the context) */ 
     
    253262 
    254263   // Could actually make one of these per thread instead of context. 
     264#if OSG_MAJOR_VERSION >= 2 
     265   c_data->mRenderAction = OSG::RenderTraversalAction::create(); 
     266#else 
    255267   c_data->mRenderAction = OSG::RenderAction::create(); 
     268#endif 
    256269   // c_data->mRenderAction->setAutoFrustum(false);         // Turn off auto frustum 
    257270 
     
    336349 
    337350   glPopAttrib();    // Pop the attribute store 
    338  
     351#if OSG_MAJOR_VERSION < 2 
    339352   FINFO(("Frame done on Window %lx.\n", c_data->mWin.getCPtr() )); 
     353#endif 
    340354} 
    341355