Jump to content

[SOLVED] from 2.16 to 2.18 migration.


photo

Recommended Posts

The project currently under development is version 2.16, but we are working on migrating to 2.18.

However, it doesn't work, so I created a simple test module and tested it, but it still quits immediately.

This is a unit program that is being developed by converting it based on the code developed previously during the 2.16 migration.

I wonder which part is wrong. Once it is rendered first, it will be easier from now on.


thank you

unigine_project_2.world

Edited by park.sungsoo
Link to comment

(2.16)

image.png.7b0be9f11b1fc24e3db8a81431889327.png 

(2.18)

image.png.d75f36190ff92cbf354ea3cd6477bab5.png

CreateWindow 

The function is delivered uninitialized.

There was no problem in version 2.16, but I am curious where the problem is. please reply.

Edited by park.sungsoo
Link to comment

Hello.

The problem with window sizes occurs because you are returning zero sizes for dpi values. Also, always returns zero display resolution. You need to correct it at least to constant values:

int CustomWinAPIProxy::getDisplayDefaultSystemDPI() const
{
	return 96;
}

Math::ivec2 CustomWinAPIProxy::getDisplayResolution(int display_index) const
{
	return Math::ivec2(1920, 1080);
}

int CustomWinAPIProxy::getDisplayDPI(int display_index) const
{
	return 96;
}

The WM_QUIT message appears because you call PostQuitMessage(0) when you delete the window. But the engine now works with multiple windows. The loading screen and the main window are different engine windows. And when you remove the loading screen, you exit the iterate loop. You need to remove the sending of this event, and select another condition to close the application. For example, that there are no more windows in the proxy.

After these changes, the application will work, but with minimal logic.

image.png

Link to comment
  • silent changed the title to [SOLVED] from 2.16 to 2.18 migration.
×
×
  • Create New...