Archive 17/01/2023.

Problems with 3D samples on Win10

NinjaPangolin

I used MinGW from Stephan Lavavej’s site to compile Urho3D on Windows 7 and it worked just fine. Now I’ve updated to Windows 10 and successfully compiled the lib. Used default options (OpenGL renderer) with cmake_mingw.bat build -DMINGW_SYSROOT=C:\MinGW. 2D samples works fine, but 3D ones do not. Here’s how 13_CharacterDemo.exe looks like:

Urho3D

It’s upside-down, model is squashed and moving the mouse causes it to be stretched into infinity. What is going on here?

Leith

Interestingly, the 2D UI stuff is not being affected - did you download the latest code from the master on github, or the older 1.7 stuff from the website? I’m running windows 10 in dual boot, and would be happy to verify and check out what happened.

Eugene

I have seen similar issues when there was compiler bug in VS 2017.
Try DX9/11 just in case, and other compiler too.

Leith

A compiler bug somehow flips matrices? hmmm

NinjaPangolin

I use 1.7 version from the website because I have problems with compiling ThirdParty/SLikeNet with MinGW (no safe functions such as strcpy_s and strcat_s were available).

Leith

I have to suspect SDL is at fault, without having looked closer

Miegamicis

Could you create issue about this on Github with the Windows version, MinGW version etc. so I can take a look at this?

Eugene

@Leith There was a bug that 16th argument of the function was just ignored. So the matrix got slightly mis-constructed that resulted in weird projection artifacts.

@NinjaPangolin I thought SLikeNet issues were fixed. I highly recommend to use master version whenever possible.

Leith

thanks for the heads up, I am not used to seeing ‘half’ of the render get inverted

S.L.C

Isn’t this the good ol GCC 8.x matrix issue? https://github.com/urho3d/Urho3D/issues/2326

Leith

Looks like it, argument limits are annoying and wrong

NinjaPangolin

@Miegamicis, I’ve created the issue: https://github.com/urho3d/Urho3D/issues/2416

Tried to build with DirectX (cmake_mingw.bat build_direct -DMINGW_SYSROOT=C:\MinGW -DURHO3D_D3D11=1), also with Lavavej’s MinGW 16.1, got different error:

CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find DirectX using MinGW default search paths (missing: D3D11)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
CMake/Modules/FindDirectX.cmake:239 (find_package_handle_standard_args)
CMake/Modules/UrhoCommon.cmake:470 (find_package)
CMakeLists.txt:45 (include)

– Configuring incomplete, errors occurred!
See also “C:/GameProject/Urho3D/build_direct/CMakeFiles/CMakeOutput.log”.
See also “C:/GameProject/Urho3D/build_direct/CMakeFiles/CMakeError.log”.

Looks like it’s related to this.

Currently trying to compile Urho 1.7 with MinGW 16.0 version (GCC 8.1.0 instead of GCC 8.2.0), though if it’s really GCC 8.X.X then I guess it won’t help. I’ll try 7.3 next time.

Leith

Thank you for raising this issue. I tend to fix issues or complain, you took the time. I commend you.

Miegamicis

Thanks, will take a look at this!

NinjaPangolin

Removing -ffast-math from Urho3D/CMake/Modules/UrhoCommon.cmake helped.