Jacob Moen avatar Jacob Moen committed 5cd19f8

New view modes does not work on cameras

Comments (0)

Files changed (2)

Ogitor/src/CameraEditor.cpp

 {
     if(mHandle)
     {
-        mOgitorsRoot->SetViewDetail((Ogitors::ViewDetail)value);
+        mHandle->setPolygonMode((Ogre::PolygonMode)value);
     }
     return true;
 }
     PROPERTY_PTR(mClipDistance, "clipdistance",Ogre::Vector2,Ogre::Vector2(0.1f,9000.0f),0,SETTER(Ogre::Vector2, CCameraEditor, _setClipDistance));
     PROPERTY_PTR(mFOV, "fov",Ogre::Real,1.0f,0, SETTER(Ogre::Real, CCameraEditor, _setFOV));
     PROPERTY_PTR(mAutoTrackTarget, "autotracktarget",Ogre::String,"None",0,SETTER(Ogre::String, CCameraEditor, _setAutoTrackTarget));
-    PROPERTY_PTR(mPolygonMode, "polygonmode",int,Ogitors::TEXTURED,0,SETTER(int, CCameraEditor, _setPolygonMode));
+    PROPERTY_PTR(mPolygonMode, "polygonmode",int,Ogre::PM_SOLID,0,SETTER(int, CCameraEditor, _setPolygonMode));
 
     mProperties.initValueMap(params);
 }
     mUsesHelper = true;
 
     mCameraPolygonModes.clear();
-    mCameraPolygonModes.push_back(PropertyOption("TEXTURED",Ogre::Any((int)Ogitors::TEXTURED)));
-    mCameraPolygonModes.push_back(PropertyOption("SHADED",Ogre::Any((int)Ogitors::SHADED)));
-    mCameraPolygonModes.push_back(PropertyOption("HIDDEN_LINE",Ogre::Any((int)Ogitors::HIDDEN_LINE)));
-    mCameraPolygonModes.push_back(PropertyOption("WIREFRAME",Ogre::Any((int)Ogitors::WIREFRAME)));
+    mCameraPolygonModes.push_back(PropertyOption("PM_SOLID",Ogre::Any((int)Ogre::PM_SOLID)));
+    mCameraPolygonModes.push_back(PropertyOption("PM_POINTS",Ogre::Any((int)Ogre::PM_POINTS)));
+    mCameraPolygonModes.push_back(PropertyOption("PM_WIREFRAME",Ogre::Any((int)Ogre::PM_WIREFRAME)));
 
     mCameraViewModes.clear();
     mCameraViewModes.push_back(PropertyOption("FREE", Ogre::Any((int)CVM_FREE)));

Ogitor/src/ViewportEditor.cpp

     mCamFOV->initAndSignal(fval);
     mActiveCamera->getProperties()->getValue("polygonmode", ival);
     mCamPolyMode->initAndSignal(ival);
-    if(ival != Ogitors::SHADED)
+    if(ival != Ogre::PM_SOLID)
         mHandle->setVisibilityMask(0x7FFFFFFF);
     else
         mHandle->setVisibilityMask(0xFFFFFFFF);
     if(mViewCamera)
     {
         mViewCamera->setPolygonMode(value);
-        if(value != Ogitors::TEXTURED)
+        if(value != Ogre::PM_SOLID)
             mHandle->setVisibilityMask(0x7FFFFFFF);
         else
             mHandle->setVisibilityMask(0xFFFFFFFF);
     PROPERTY_PTR(mCamPosition    , "camera::position"  ,Ogre::Vector3    ,Ogre::Vector3::ZERO     ,0, SETTER(Ogre::Vector3, CViewportEditor, _setCamPosition));
     PROPERTY_PTR(mCamOrientation , "camera::orientation",Ogre::Quaternion,Ogre::Quaternion::IDENTITY,0, SETTER(Ogre::Quaternion, CViewportEditor, _setCamOrientation));
     PROPERTY_PTR(mCamClipDistance, "camera::clipdistance",Ogre::Vector2  ,Ogre::Vector2(0.1f,9000.0f)   ,0, SETTER(Ogre::Vector2, CViewportEditor, _setCamClipDistance));
-    PROPERTY_PTR(mCamPolyMode    , "camera::polymode"  ,int              ,Ogitors::TEXTURED          ,0, SETTER(int, CViewportEditor, _setCamPolyMode));
+    PROPERTY_PTR(mCamPolyMode    , "camera::polymode"  ,int              ,Ogre::PM_SOLID          ,0, SETTER(int, CViewportEditor, _setCamPolyMode));
     PROPERTY_PTR(mCamFOV         , "camera::fov"       ,Ogre::Real       ,1.0f                    ,0, SETTER(Ogre::Real, CViewportEditor, _setCamFOV));
 
     mProperties.initValueMap(params);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.