Jump to content

App Class


photo

Recommended Posts

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

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

  • Like 1
Link to comment

Hi folks

 

I'm getting already quite nice results. But I'm struggling with synchronizing the lightnings effects and/or materials.

 

post-1459-0-94971700-1437122937_thumb.png

 

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

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

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?

 

post-1459-0-82326200-1437124583_thumb.png

Link to comment

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

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
×
×
  • Create New...