renato.semadeni Posted July 10, 2015 Share Posted July 10, 2015 Hey chaps =) I'm trying to create a custom made window and let unigine render into it. I was looking through your documentation of the App Class, as well as the samples for QT in combination with opengl or direct3d. I'm still struggling and my intention is to simply create a blank fullscreen window in Windows and render into it what the engine is producing. I'm hoping for a start-up aid =) Kind regards, Renato Link to comment
kevin Posted July 10, 2015 Share Posted July 10, 2015 Hi Renato, Take a look at the Unigine::Render class, specifically Unigine::Render::renderViewport and Unigine::Render::renderImage2D. If you're able to use Qt, the samples/Api/Render/RenderQt sample shows a very simple way of doing this via renderImage2D, or you can render directly to OpenGL/DirectX textures using renderViewport (see plugins/App/AppOculus). Kevin 1 Link to comment
renato.semadeni Posted July 17, 2015 Author Share Posted July 17, 2015 Hi folks I'm getting already quite nice results. But I'm struggling with synchronizing the lightnings effects and/or materials. I'm creating with the App class two new windows and pass them to the initialization of the engine. Further I'm using the AppWindow and the D3D11Window class as parent classes. Now, I have to rotate one of the frustums to the side, I do this by rotating the player's projection matrix. But as you can see in the picture, as seen as I rotate the reflections aren't somehow disabled. I'm passing the projection matrix, the modelview matrix, the reflection mask and the viewport mask to the second window. Similiar to that in the AppWall plugin. Hope you can help, Renato Link to comment
renato.semadeni Posted July 17, 2015 Author Share Posted July 17, 2015 Okay, I think I found the problem already. I don't have to rotate the projection matrix but the modelview matrix, but in reversed order. Link to comment
renato.semadeni Posted July 17, 2015 Author Share Posted July 17, 2015 What I don't get right is the missing bluring effect on the rotated windows. Do I have to apply a filter or how do I get the same blurring? Link to comment
unclebob Posted July 17, 2015 Share Posted July 17, 2015 Hi Renato! Make sure you set the same multisample settings for all your render targets. Link to comment
renato.semadeni Posted July 20, 2015 Author Share Posted July 20, 2015 Hi Andrey, Okay... Can I access them from the primary window as I doing it with the projection matrix or the reflection mask? kind regards, Renato Link to comment
renato.semadeni Posted July 27, 2015 Author Share Posted July 27, 2015 Hi there I still struggling to get the same multisampling to my additional windows. My D3D11Window derivate checks as in the provided AppWall implementation for the multisampling. But I don't get the same result on all screens, but also no exception. // check multisampleUINT levels = 0; if(getMultisample() && (device->CheckMultisampleQualityLevels(DXGI_FORMAT_R8G8B8A8_UNORM,getMultisample(),&levels) != S_OK || levels == 0)) { throw("required multisample is not supported"); } Thanks for any help, Renato Link to comment
Recommended Posts