Jump to content

Search the Community

Showing results for tags 'restorestate'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hi All, I'm currently implementing a custom fisheye viewport since the panoramic rendering is not open enough for our needs. As described in other posts I'm disabling various screen space effects. However, there might be other viewports that still can have the SS effekts enabled. So in in my FisheyeViewport::render() I want to disable and later reenable the render settings. Currently the Code looks like this: void FisheyeViewport::render() { // ... // save current render settings // Unigine::BlobPtr render_settings_blob = Unigine::Blob::create(); // Unigine::Render::saveState(render_settings_blob); Unigine::XmlPtr render_settings = Unigine::Xml::create(); Unigine::Render::saveWorld(render_settings); Unigine::Render::setTAA(false); Unigine::Render::setSSAO(false); Unigine::Render::setSSR(false); Unigine::Render::setWhiteBalance(false); Unigine::Render::setExposureMode(Unigine::Render::EXPOSURE_DISABLED); Unigine::Render::setExposure(2); Unigine::Render::setBloom(false); Unigine::Render::setFilmic(false); Unigine::Render::setLightsLensFlares(false); // do the fisheye rendering // ... // restore render settings // Unigine::Render::restoreState(render_settings_blob); Unigine::Render::loadWorld(render_settings); } The Render::restoreState() function is marked as deprecated (although it still exists in 2.12). The Render::saveState() function is not marked as deprecated which irritates me as I don't see how to use it without Render::restoreState(). Also using Render::restoreState() as described above results in an Exception: terminate called after throwing an instance of 'char const*' Signal: SIGABRT (Aborted) which is why I switched to using an XML node. This works, but feels more like a workaround. Whats the intended workflow for saving and restoring the state? Thanks and greetings!
×
×
  • Create New...