fix swapBuffers error on close & camera props
This commit is contained in:
parent
ef52688d66
commit
eda5b0aa22
|
|
@ -124,7 +124,8 @@ namespace RNR
|
||||||
ogreCamera->getParentSceneNode()->setOrientation(Ogre::Quaternion(cam->getCFrame().getRotation()));
|
ogreCamera->getParentSceneNode()->setOrientation(Ogre::Quaternion(cam->getCFrame().getRotation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ogreRoot->renderOneFrame(this->delta);
|
if(isVisible())
|
||||||
|
ogreRoot->renderOneFrame(this->delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::NameValuePairList OgreWidget::getRenderOptions()
|
Ogre::NameValuePairList OgreWidget::getRenderOptions()
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ namespace RNR
|
||||||
private:
|
private:
|
||||||
CoordinateFrame m_cframe;
|
CoordinateFrame m_cframe;
|
||||||
virtual void deserializeProperty(char* prop_name, pugi::xml_node prop);
|
virtual void deserializeProperty(char* prop_name, pugi::xml_node prop);
|
||||||
|
virtual void addProperties(std::vector<ReflectionProperty>& properties);
|
||||||
public:
|
public:
|
||||||
Camera();
|
Camera();
|
||||||
~Camera();
|
~Camera();
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,16 @@ namespace RNR
|
||||||
setCFrame(XML::getCFrame(node));
|
setCFrame(XML::getCFrame(node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Camera::addProperties(std::vector<ReflectionProperty>& properties)
|
||||||
|
{
|
||||||
|
ReflectionProperty _properties[] = {
|
||||||
|
{ this, std::string("CFrame"), std::string(""),
|
||||||
|
ACCESS_NONE, OPERATION_READWRITE, PROPERTY_CFRAME,
|
||||||
|
REFLECTION_GETTER(Camera* instance = (Camera*)object; return &instance->m_cframe; ),
|
||||||
|
REFLECTION_SETTER(Camera* instance = (Camera*)object; instance->setCFrame(*(CoordinateFrame*)value); ) },
|
||||||
|
};
|
||||||
|
|
||||||
|
properties.insert(properties.end(), _properties, _properties+(sizeof(_properties)/sizeof(ReflectionProperty)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue