I’ve come to a point that I want to move my application to 64 bits. I’m using VS2017, DirectX11.
I use Urho3D as separate a library, to display a 3D view of a design, so as a CView in MFC.
This always worked fine in the 32 bit version of the program.
Now that I’ve changed everything to 64 bits, the 3D viewer is behaving weirdly.
When moving the camera, most of the time nothing is visible. But at certain angles/positions, I can see the Skybox that used to surround the scene. I see it as a sphere now. See attached picture.
I’ve been searching for two days now trying to find out what’s causing this, but still no real clue.
It might be compiler settings in the Urho3D project files, or perhaps a #define somewhere.
As you can see the DebugHud appears as it should.
Hopefully any of you can give me a push in the right direction?
No, when I use the standard CMake/Win64 procedure, the examples work fine.
About a year ago, I took from Urho3D (1.7) the elements I needed, and over time, I changed a few things like the AssImp Collada exporter. Also, as some of the third party components share libraries with other parts of my application (zlib, unzip), some changes had to be made to make it all work together.
Now, I just tried to change the target to x64, hoping it would work.
I understand very well that using a slightly adapted version of Urho3D makes it very hard to say anything, but I hope that someone would recognize the Skybox turning into a sphere, and would think aha: you need to make sure that this library setting is such and such, or that this or that DirectX directive is set correctly . I think it has something to do with basic primitive type sizes, but as far as I know they’re the same for int, float, etc. for 32 and 64 bit environments in MSVC at least.
Otherwise, I’ll try and make baby steps from the working sample into my application.
I just use the Urho3D 1.7 download from the main Urho3d page.
It can be reproduced with the standard examples, debug version. I’m not sure it’s 100% the same problem, but it looks similar.
The steps I took:
Download and unzip Urho3D-1.7.zip
Run CMake, for Visual Studio 2017 Win 64
Start VS2017, and open Urho3D.sln
Build the Debug configuration
Run example 4, StaticScene
When looking around using the mouse the Window goes fully black for certain angles
Example 11 (Physics) and 23 (Water) have a similar behavior.
I’ve built it on my main desktop computer, but see the same behavior on different computers I run the resulting executable on.
Okay. I will also test this out myself (hopefully today). I usually build only x64 version on Windows but haven’t experienced anything like that before.
Thanks! Just for illustration, here are two screen captures of example 4:
Release:
Debug:
So the debug build has the problem. The release build seems to be fine. I’m using the mouse and the WASD keys. You see items disappear when using the W key.
I just built everything on another machine (Surface Pro/Windows 10) with a fresh installation of Visual Studio 2017.
The debug build has the same problem.
So I hope you can reproduce it.
Thanks a lot for looking into it. I appreciate it a lot!
I’m seeing the same issue using Visual studio 2017, 64bit and using Directx11 debug build.
So far I couldn’t find out what could be the issue, but my suggestion would be using Visual Studio 2015 till it’s fixed.
Also it would be useful if you could register this issue in the github.
Thanks for confirming that you reproduced the problem.
I reported it as a bug:
Going back to VS2015 is not really an option, as much of the rest of the project uses C++14 and C++17 features, but I verified and indeed, in VS2015, it does work as it should.
Does anyone else have any idea what might be the difference between the VS2015 and VS2017 builds?
I found the following, perhaps making it easier to find the bug.
If, in example 04, StaticScene, you change the initial camera position in line 124 to: cameraNode_->SetPosition(Vector3(0.0f, 5.0f, 16.0083713531494f));
You’ll see the missing bits in the foreground from the start.
If you change the initial camera position to: cameraNode_->SetPosition(Vector3(0.0f, 5.0f, -1.21793007850647f));
The screen is black from the start. If you move forward (by pressing ‘W’), the scene becomes visible again.